Deploying JDBC proxy into the RedHat JBoss server
The JDBC proxy must be deployed on each application server that is running RedHat JBoss. 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
To deploy the JDBC proxy into the RedHat JBoss server:
Procedure
- Download and extract the JDBC driver that is provided with HCL Quality Server. For more information, see HCL OneTest API 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 RedHat JBoss installation directory/server/version number/lib or to whichever 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
- Configure the server start script (RedHat
JBoss installation directory/bin/standalone.conf.bat)
by using the
JAVA_OPTS
variable to set thejdbc.drivers
property.set JAVA_OPTS=%JAVA_OPTS% -Djdbc.drivers=com.greenhat.jdbc.Driver
If a
-D
entry that specifies drivers already exists, ensure that com.greenhat.jdbc.Driver is listed first and that the other entries are appended in a colon-separated list.Note: In some cases, JBoss fails to process registration.xml when you copy it into the same folder as the JAR files, which causes the server to start incorrectly. To resolve the issue, move registration.xml to a different folder and add the following Java option to the start script:-Dcom.greenhat.registration=path to registration.xml
.The following is a typical example for a Windows setup:
set JAVA_OPTS=%JAVA_OPTS% -Djdbc.drivers=com.greenhat.jdbc.Driver -Dcom.greenhat.registration=C:\JBoss\standalone\conf\registration.xml
- Save and close the file.
- If necessary, edit the
server
tag in theregistration.xml
file to the URL of the HCL Quality Server 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.Important: If these tags are modified, the JDBC proxy is used only when you record and stub within the specified domain and environment. - Use HCL OneTest™ API and HCL Quality Server to control JDBC recording and stubbing. For more information, see HCL OneTest API reference and HCL OneTest Virtualization overview.