Deploying JDBC proxy into Apache Tomcat
The JDBC proxy must be deployed on each application server that is running Apache Tomcat. The JDBC proxy enables a server that hosts applications to use JDBC to access a live database that you want to record or virtualize.
Procedure
- Download and extract the JDBC driver that is provided with HCL DevOps Test Virtualization Control Panel (Test Virtualization Control Panel). For more information, see DevOps Test Integrations and APIs tool packages.
-
Copy the files
com.ibm.rational.rit.jdbcdriver4.jar
,jsqlparser15.jar
andantlr-3.4.jar
, and the JDBC proxy configuration file (registration.xml
) from the downloaded JDBCIntercept.zip package to<Tomcat installation directory>\common\lib
or to whichever Tomcat library folder that 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
- Configure the Tomcat startup script (
%CATALINA_HOME%\bin\catalina.bat
, if you are using Microsoft™ Windows™; or$CATALINA_HOME/bin/catalina.sh
, if you are using Unix-like systems) by using theJAVA_OPTS
variable to set thejdbc.drivers
property as follows:SET JAVA_OPTS=%JAVA_OPTS% -Djdbc.drivers=com.greenhat.jdbc.Driver
Note: If there is already a-D
entry that is specifying drivers, ensure thatcom.greenhat.jdbc.Driver
is listed first and that the other entries appended after are in a colon-separated list. - Save and close the file.
-
If necessary, edit the
server
tag in theregistration.xml file
to the URL of the Test Virtualization Control Panel installation that is being used.For information about modifying this file, see Modifying the configuration settings of the JDBC proxy.
- Optional: Edit the
domain
andenvironment
tags in theregistration.xml
file.If these tags are modified, the JDBC proxy is used only when you record and stub within the specified domain and environment.
- Use Test Integrations and APIs and Test Virtualization Control Panel to control JDBC recording and stubbing.