O'Reilly logo

Expert Oracle and Java Security: Programming Secure Oracle Database Applications with Java by David Coffin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A Set of Connection Strings for an Application

On the client side, we are going to handle our table of connection strings as a HashMap, which we will call connsHash. You must assure that it is marked private so only the OracleJavaSecure class can see it. Here is the declaration:

    private static HashMap<String, RAW> connsHash = null;

We will have exchanged keys with the Oracle database, so we can receive this table of connection strings encrypted with the shared password key. We will only decrypt them as needed, creating a connection and then freeing the connection string for garbage collection (retaining no class member reference to it.) Note that until the garbage collector runs (automatically, self-scheduling), the clear-text connection ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required