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:

  1. Copy the Parasoft JDBC Driver jar file into a location that your application can access.
  2. Alter the application’s JDBC connection configuration to use the Parasoft JDBC Driver instead of the current database vendor driver.
  3. 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 java.sql.DriverManager to create an instance of java.sql.Driver (as the sample ParaBank application does), set parasoft.virtualize.driver.register.jdbcproxydriver.in.drivermanager to true. This tells the Parasoft JDBC Driver to register itself in the runtime's java.sql.DriverManager using the DriverManager.registerDriver() method.

    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 parasoft.virtualize.driver.proxy.direct to true. This tells the Parasoft JDBC Driver to use proxied connections (instead of the original connection from the original driver) so it can record, virtualize, and so on.

  4. Ensure that these properties are applied by restarting the server or applying them in the manner supported by your server.