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"; ...

Get Expert Oracle and Java Security: Programming Secure Oracle Database Applications with Java 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.