Database Reference
In-Depth Information
"orajavsec.OracleJavaSecure$InnerRevLvlClass" "20110101b" "ACED00057372... "11-JUN-11"
"orajavsec.OracleJavaSecure$InnerRevLvlClass" "20110101a" "ACED00057372... "11-JUN-11"
Once more we edit
OracleJavaSecure.java
and comment two areas of the
main()
method. First
comment the line that copies the list of connection strings from an old version to the new version.
//
copyAppConnections( "20110101a" );
Then comment the lines that would overwrite and insert new connection strings into the list.
//
putAppConnString( "Orcl", "hr",
//
"password", "localhost", String.valueOf( 1521 ) );
//
putAppConnString( "Orcl", "appusr",
//
"password", "localhost", String.valueOf( 1521 ) );
For the final times, compile
OracleJavaSecure
and run it. The first time it runs, you will see that
there were already two connection strings (
connsHash.size = 2
) in the list that was copied from the
previous version of the application. In the middle of the run, we call
removeAppConnString()
and then we
run
putAppConnections()
to update Oracle with a list of only one connection string for this application.
The second time it is run, you will see that, because we didn't update and add connection strings, there
is only one to start with (
connsHash.size = 1
).
Chapter11>javac orajavsec/OracleJavaSecure.java
Chapter11>java orajavsec.OracleJavaSecure
Chapter11>java orajavsec.OracleJavaSecure 1234-5678-9012
Main encodes a new APPVER password if given.
After encoding, paste encoded string
in setAppVerConnection method.
Domain: ORGDOMAIN, Name: OSADMIN
connsHash.size = 2
connsHash.size = 1
Domain: ORGDOMAIN, Name: OSADMIN
2011-06-11 18:04:15
Chapter11>java orajavsec.OracleJavaSecure 1234-5678-9012
Main encodes a new APPVER password if given.
After encoding, paste encoded string
in setAppVerConnection method.
Domain: ORGDOMAIN, Name: OSADMIN
connsHash.size = 1
connsHash.size = 1
Domain: ORGDOMAIN, Name: OSADMIN
2011-06-11 18:04:26
We conclude that our
copyAppConnections()
process works to replicate an existing list of connection
strings from one version of the application to the next (with an updated
innerClassRevLvl
in the inner
class.) This will be a timesaver when we upgrade our application and don't need to change connection
strings.
Test from a Different Application, TestOracleJavaSecure
TestOracleJavaSecure
is independent from whatever instance is running application verification. It will
act as a client application, calling methods in the
OracleJavaSecure
class in order to use those security
features. Using
OracleJavaSecure
, the test application will do the following things: