Database Reference
In-Depth Information
0a112203060116174e585a5c115704041e0a16
jdbc:oracle:thin:appver/appverPassword@localhost:1521:apver
We need to place that encoded string (see the bold data) into the setAppVerConnection() method in
OracleJavaSecure.java . That method will look like Listing 11-54 when done (the prime String is all one
line, though shown here with word-wrap onto a second line).
Listing 11-54. Embed Newly Encoded appver Connection String into OracleJavaSecure Code
private static void setAppVerConnection() {
try {
// Set this String from encoded String at command prompt (main)
String prime =
"030a42105f1b3311133a0048370707005f020419190b524204041819015c390f5300121b3314303a0a112203060
116174e585a5c115704041e0a16";
setConnection( OJSC.y( prime ) );
appVerConn = conn;
} catch( Exception x ) {
x.printStackTrace();
}
}
Note It is this one value, prime that directs our applications to use an alternate database instance for
application verification.
Edit the Application Passwords to Be Used
We are going to upload a list of connection strings to Oracle database for the HRVIEW application. Update
the main() method of OracleJavaSecure to have the correct passwords (substitute for the “password”
string) for HR and appusr users, shown in Listing 11-55. Correct the other aspects of your Oracle
application connection strings as well.
Note These connection strings are intended to connect to the orcl instance, not the new apver instance.
Listing 11-55. Connection Strings for Application, OracleJavaSecure.main()
putAppConnString()( "Orcl", "hr",
" password ", "localhost", String.valueOf( 1521 ) );
putAppConnString()( "Orcl", "appusr",
" password ", "localhost", String.valueOf( 1521 ) );
 
Search WWH ::




Custom Search