File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Socket Permissions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Socket Permissions" Watch "Socket Permissions" New topic

Socket Permissions

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I'm using an applet and JDBC to access a database, and have successfully connected from my own machine which is the applet host.
This has been achieved by running oracle connection manager on the database host and setting up the necessary socket permissions on my own machine.
The problem I now have is that I want to deploy my applet from my machine, using ms personal web server, allowing another client to access the database via the applet hosted on my machine.
Unfortunately when an atempt is made to connect via the applet I get the error denied( {database host} resolve)
Since the client is required to be able to use any machine on the internet, it is not really practical for each client machine to have a policy file set up, and I think though I may be wrong here that similar concerns make signed applets a problem because I believe they require the client machine to have a file of trusted applets (again I am not sure of this).
I would be very grateful if anyone could tell me how to get round this problem, or indeed if it is not possible for a connection to be made to another machine than the one from which the applet has been loaded
Thanks, Garry
Harish Kashyap
Ranch Hand

Joined: Jun 14, 2000
Posts: 118
It comes from the definition of the applets that they can access the resources of the system on which they are created. if u are connecting to some database u are using the socket on the system .
so if u deploy the applet the applet will try to access the socket on that system .
so the solution what i can suggest is that don't give the database access directly to the clients. create a mediator between the applet and the database. your applet will communicate with that mediator and that will in turns fetch the database for applet.

I agree. Here's the link:
subject: Socket Permissions
It's not a secret anymore!