Guidelines for Choosing a Workaround

Now that you understand the connection restrictions that JDBC applets face, let’s discuss the best time to use each solution.

For an intranet-based application, Connection Manager is your easiest solution. If an applet will be used solely on your internal network, common sense dictates that there is probably no need to go through the additional work of signing your applets to establish trust, for you know who has created them, and you implicitly trust the individuals that work for your organization. In addition, and for the same reason, there is no need to set up a security policy to restrict the applet’s access to a specified resource. By using Connection Manager, you do not need to go through either of these steps to establish a remote connection, thereby saving you the costs of signing your applets and administering local policy on each user’s desktop.

On the other hand, for an Internet-based application, you will want the signed applet to verify a trust chain and to force the use of a security policy to restrict the applet’s access to local resources. As an end user of an Internet-based applet, you’ll want to verify that the applet is from the source you trust and prevent the applet from accessing any restricted resources. In addition, you may be required to pass through a firewall to access a remote database, in which case the applet’s signer will need to use the firewall URL syntax to establish a remote database connection through your firewall ...

Get Java Programming with Oracle JDBC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.