Deploying JDBC proxy into an Oracle WebLogic Server
The JDBC proxy must be deployed on each application server that is running WebLogic. The JDBC proxy enables a server that hosts applications to use JDBC to access a live database that you want to record or virtualize.
About this task
The instructions are based on Oracle WebLogic Server 10.3 running on Microsoft™ Windows™.
If you are using a different version of WebLogic Server or a different operating system, or deploying the JDBC proxy in a clustered WebLogic Server environment, some of the steps might be different.
For more information, see the Oracle website or WebLogic Server product documentation.
Procedure
- Download and extract the JDBC driver that is provided with Rational® Test Control Panel. For more information, see Rational Integration Tester tool packages.
-
Copy the files that are listed in the following table and
the JDBC proxy configuration file (
registration.xml
) from the downloaded JDBCIntercept.zip package to<Oracle installation directory>\Middleware\wlserver<Version number>\server\lib
or to whichever WebLogic Server folder contains JDBC drivers.JDBC / Java™ version File name Description JDBC 4, Java™ 1.6 or later com.ibm.rational.rit.jdbcdriver4.jar
jsqlparser15.jar
andantlr-3.4.jar
The JDBC proxy.
Supporting libraries.
Notes:- Currently, JDBC 4, Java 1.6 or later is supported for the JDBC proxy and its supporting
libraries. You must add the three JAR files
com.ibm.rational.rit.jdbcdriver4.jar
,jsqlparser15.jar
andantlr-3.4.jar
to each application server directory that contains JDBC drivers. - The following items are not supported for vendor-specific Oracle SQLs:
- Oracle-specific DDL statements
- Custom functions
- Subqueries
- PIVOT and UNPIVOT statements
- Nested tables containing multiple columns or single column of user-defined-types
- Stubs with nested tables
- Currently, JDBC 4, Java 1.6 or later is supported for the JDBC proxy and its supporting
libraries. You must add the three JAR files
-
Update the
CLASSPATH
of WebLogic Server with the path to the driver files based on the Java™ and JDBC version that you are using. Modify theCLASSPATH
in thecommEnv.cmd
file in<Oracle installation directory>\Middleware\wlserver<Version number>\common\bin
to one of the following examples:set WEBLOGIC_CLASSPATH=%WL_HOME%\server\lib\greenhat.jdbcdriver.jar;%WL_HOME%\server\lib\jsqlparser15.jar;%WL_HOME%\server\lib\antlr-3.4.jar;%WL_HOME%\server\lib\registration.xml;... set WEBLOGIC_CLASSPATH=%WL_HOME%\server\lib\com.ibm.rational.rit.jdbcdriver4.jar;%WL_HOME%\server\lib\jsqlparser15.jar;%WL_HOME%\server\lib\antlr-3.4.jar;%WL_HOME%\server\lib\registration.xml;...
Note: If the JDBC proxy files are in a location other than<Oracle installation directory>\Middleware\wlserver<Version number>\server\lib
, the correct location must be mentioned in theCLASSPATH
. -
Save and close the
commEnv.cmd
file. - Restart the WebLogic server.
- Log in to WebLogic Server Administration Console.
- On the Domain Structure tree, expand Services.
- Expand JDBC.
-
Click Data Sources.
The Summary of Data Sources page is displayed.
-
Click New.
The Create a New JDBC Data Source page is displayed.
- In the Name and JNDI Name fields, enter a name and a JNDI name for the Green Hat data source.
-
In the Database Type list,
click Other.
The selected driver in the Database Driver list changes to Other.
Note: If the selected driver does not change, click Other. - Click Next.
- Select the Supports Global Transactions check box.
-
Select an option for transaction processing.
Important: The available options vary depending on whether you select an XA driver or a non-XA driver.
- Click Next.
- In the Database Name, Host Name, Port, Database User Name, Password, and Confirm Password fields, enter details about the (live) physical database resource in Rational® Integration Tester.
- Click Next.
- Enter com.greenhat.jdbc.Driver in the Driver Class Name field.
-
In the URL field,
enter the real URL of the database.
The Database User Name, Password, and Confirm Password fields are populated from the previous page.
- Optional: Click Test Configuration to verify that WebLogic Server can connect to the specified database.
- Click Next.
- Select the check box of each deployment target for the new JDBC data source.
- Click Finish.
-
To activate these changes, in the Change Center of the
Administration Console, click Activate Changes.
Tip: To ensure that all of the changes take effect, you might need to restart the WebLogic server.
-
Edit the
server
tag in theregistration.xml
file to the URL of the IBM® Rational® Test Control Panel installation that is being used. - Optional:
Edit the
domain
andenvironment
tags in theregistration.xml
file.Important: If these tags are modified, the JDBC proxy is used only when you record and stub within the specified domain and environment.
Results
The JDBC proxy is now deployed on Oracle WebLogic Server.
Use Rational® Integration Tester and Rational® Test Control Panel to control JDBC recording and stubbing.