This section applies if the application that uses the JDBC driver you wish to virtualize is either:
In such cases, the Parasoft JDBC Driver can be used and controlled via system properties (if the generic java.sql.Driver
class implementation is used), or via the driver properties (if another implementation is used).
To do this:
java.sql.Driver
is used by the application, then modify the driver class name to com.parasoft.xtest.jdbc.virt.driver.JDBCProxyDriver
, and edit the JDBC connection URL used by your application tojdbc:parasoft:proxydriver:<original driver fully qualified class name>:@<original driver connection URL>
. For example, if the original JDBC connection URL was org.hsqldb.jdbcDriver:@jdbc:hsqldb:hsql://localhost/parabank
, then change it to jdbc:parasoft:proxydriver:org.hsqldb.jdbcDriver:@jdbc:hsqldb:hsql://localhost/parabank
If an implementation of java.sql.Driver
is used, then add the required properties to the system properties definition.
For example, in Tomcat servers, edit catalina.sh or catalina.bat (depending on the platform). Add the following command line arguments to the Java executable startup arguments list (with no line breaks):
-Dparasoft.virtualize.server.url=http://[virtualize server host name]:9080 -Dparasoft.virtualize.group.id=parabank -Dparasoft.virtualize.driver.register.jdbcproxydriver.in.drivermanager=true |
Be careful about introducing spaces or new lines into this one-line string set of arguments. Also note that some application servers provide variables that can be edited (or have these arguments appended to them) in order to facilitate managing such changes.
If the application uses a If the application will use the driver directly by creating a new instance of the JDBC driver and then calling the connect method on the driver, then set |