You must enable the Java™ virtualization
proxy to capture Java method
calls being used by a Java application.
About this task
The greenhat.javaproxy.jar and registration.xml files
in JavaProxy package with Rational® Test Control Panel must
always be collocated. Otherwise, the Java virtualization
proxy will not work correctly.
Procedure
- Add greenhat.javaproxy.jar to the CLASSPATH of
the Java application.
- Change the Java application
to use alternative settings for initial context factory and provider
URL (if applicable).
Note: If it is not possible to
change the application's initial context factory or provider URL settings,
you will not be able to use the Java virtualization
proxy. As an alternative, you could use the Java virtualization agent.
IBM WebSphere Application Server 6.1
Review
the following examples:
- If your Java application
connects with IBM® WebSphere® Application Server 6.1
through the thin client with provider URL iiop://localhost,
intercept these calls by adding or modifying the following program
arguments:
-classpath greenhat.javaproxy.jar...
-Djava.naming.factory.initial=com.ibm.rational.rit.javaproxy.jndi.ProxyInitialContextFactory
-Djava.naming.provider.url=proxy:com.ibm.websphere.naming.WsnInitialContextFactory:iiop://localhost
Note: The
prefix proxy: and the final colon (:) before
the original provider URL are required.
- If your Java application
connects with WebSphere Application Server 6.1
through the full J2EE client with provider URL iiop://localhost,
intercept these calls by adding or modifying the following arguments
in the launchClient tool:
-CCclasspath=greenhat.javaproxy.jar
-CCDjava.naming.factory.initial=com.ibm.rational.rit.javaproxy.jndi.ProxyInitialContextFactory
-CCproviderURL=proxy:com.ibm.websphere.naming.WsnInitialContextFactory:iiop://localhost
Note: The
prefix proxy: and the final colon (:) before
the original provider URL are required.
- If using the full J2EE client, you must also do the following: