This topic provides an overview of how to configure the Parasoft JDBC Driver.
The recommended configuration process is:
- Place the Parasoft JDBC Driver jar file on the application server (the following sections indicate exactly where it should be placed on each type of server). The driver (
ParasoftJDBCDriver.jar)ships with Parasoft Virtualize under
[virtualize installation directory]/proxies.
- Configure the driver to register with the appropriate Virtualize Server. The method for configuring the Parasoft JDBC Driver varies depending on how your application is deployed. For details on how to perform the configurations appropriate for your specific environment, see:
- Configuration on WebSphere Application Servers
- Configuration on webMethods Integration Servers
- Configuration on TIBCO ActiveMatrix BusinessWorks
- Configuration on Oracle/BEA WebLogic 9.2 Application Servers
- Configuration on Oracle WebLogic 10.3 (11g) Application Servers
- Configuration on Apache Tomcat Application Servers
- Configuration on JBoss Application Servers
- JDBC Configuration for Standalone or Other Application Server Platforms
- Configuration for ParaBank
- Start the application under test (AUT). When the driver is initialized, it will automatically connect to Virtualize and either create a new deployment configuration for that group ID or get settings from an existing deployment configuration with the same group ID. The Console view will report a message that the driver is registered:
- Verify that the JDBC Controller for this Parasoft JDBC Driver appears in the Virtualize Server view.
From that point forward, you will be able to control the JDBC driver mode and logging via the Virtualize Server view or Environment Manager. By default, the driver starts in passthrough mode with log level 1.
Driver/System Properties Required for All Environments
For all application servers and setups, you must configure the following two driver properties for the Parasoft JDBC Driver:
- virtualizeServerUrl: Specifies the hostname of Parasoft Virtualize Server. This should have the format http://[Virtualize Server host name or IP address]:9080. Port number 9080 is the default. Use a port number other than 9080 only if Virtualize Server has been configured with a different port number.
- virtualizeGroupId: The group name used to create the JDBC Controller in Virtualize. Multiple drivers may share the same group id. All drivers that share a single group id will all be updated by any configuration changes made from the related controller. For example, if you have a cluster of nodes and want to be able to start or stop recording in unison, configure them share a single group id. If you want to control them individually, assign them each a distinct group id.
- If you use an existing group id, the current Parasoft JDBC Driver will be assigned to that group’s JDBC Controller.
- If you use a new group id, a new JDBC Controller will be created for that new group id.
The following Java system properties are required startup parameters for the AUT:
- parasoft.virtualize.group.id: The equivalent of the virtualizeGroupId driver property; the default is hostname.
- parasoft.virtualize.server.url: The equivalent of the virtualizeServerUrl driver property.
These properties can be set as part of the driver URL. For example, the following sets the group ID and server URL:
Alternatively, you can usually specify these either through the Admin GUI or as command-line arguments to Java using the –D<prop_name>=<prop_value> syntax.
To see the exact system properties that your AUT needs to use, see Parasoft Environment Manager’s endpoint report. For example:
Specifying which Virtual Asset the Parasoft JDBC Driver Calls
By default, the Parasoft JDBC Driver calls the virtual asset deployed at /virtualDb (when in Virtualize or Hybrid mode—or in Failover mode and an failure occurs). To have it call a virtual asset that is deployed at a different endpoint, use the optional driver/system property:
- Driver property for all application servers and setups: virtualizeServerPath
- Java System property: parasoft.virtualize.server.path
This property should be set to the virtual asset deployment configuration path. For example, if your vir-tual asset is deployed at /myVirtualDb, you would configure this in either of the following ways:
Controlling Polling Intervals
The default (poall) provider uses a simple HTTP connection to check whether any Parasoft JDBC Driver updates (e.g., JDBC driver mode changes) have been set in the Virtualize Server view.
The default polling interval is 5000 ms. If you want to change the polling frequency, use the system property
Migration for Users of Virtualize 9.4 or Earlier
If you’ve used a version of the Parasoft JDBC Driver from Virtualize 9.4 or earlier, take the following steps to start using the latest functionality:
- Update your existing Parasoft JDBC Driver jar file (
ParasoftJDBCProxy-All.jar) to the new
ParasoftJDBCDriver.jar, which is under
[virtualize installation directory]/proxies).
- Update your driver properties by a) removing all
virtualize*properties EXCEPT for virtualizeServerUrl, then b) adding virtualizeGroupId. This specifies the group name used to create the JDBC Controller in Virtualize. Multiple drivers may share the same group id and will all be updated by any configuration changes made. If you use an existing group id, the current driver will be assigned to that group and the associated JDBC Controller. If you use a new group id, a new configuration and JDBC Controller will be created for that new group id.
In Virtualize 9.4 or earlier:
In Virtualize 9.5 and higher:
Update your AUT’s startup parameters by a) Removing all parasoft.virtualize* properties EXCEPT for parasoft.virtualize.server.url and—if used—parasoft.virtualize.driver.proxy.direct and parasoft.virtualize.driver.register.jdbcproxydriver.in.drivermanager and then b) Adding parasoft.virtualize.group.id.
In Virtualize 9.4 or earlier:
In Virtualize 9.5 and higher:
Video Tutorial: Virtualizing a Database Over JDBC
In this video, you'll learn how to virtualize a database over JDBC.