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

Testing on Client and Server

Earlier in this chapter, you compiled OracleJavaSecure.java on your workstation. Let's make a couple changes to the code now. First of all, if you saved the version that we installed on the Oracle Database, then you may have uncommented the first line. If so, comment it again:

//CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED appsec."orajavsec/OracleJavaSecure" AS

Down a little ways from the top of the file, in the body of the class code, set the boolean named testingOnServer to true. That change will cause the second half of the main() method to execute.

    private static boolean testingOnServer = true;     private static String appsecConnString =         "jdbc:oracle:thin:AppSec/password@localhost:1521:Orcl"; ...

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