This topic provides an overview of how to configure the Parasoft JDBC Driver.
The recommended configuration process is:
ParasoftJDBCDriver.jar)
ships with Parasoft Virtualize under [virtualize installation directory]/proxies
.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.
For all application servers and setups, you must configure the following two driver properties for the Parasoft JDBC Driver:
The following Java system properties are required startup parameters for the AUT:
These properties can be set as part of the driver URL. For example, the following sets the group ID and server URL:
jdbc:parasoft:proxydriver:virtualizeGroupId=derbyTest&virtualizeServerPath=MyPath:@org.apache. derby.jdbc.EmbeddedDriver:@jdbc:derby:memory:myDB;create=true |
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:
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:
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:
parasoft.virtualize.server.path=myVirtualDb |
or
virtualizeServerPath=myVirtualDb |
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 parasoft.virtualize.poll
.
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:
ParasoftJDBCProxy-All.jar
) to the new ParasoftJDBCDriver.jar
, which is under [virtualize installation directory]/proxies
).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. 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:
set JAVA_OPTIONS=%JAVA_OPTIONS% -Dparasoft.virtualize.mode=record -Dparasoft.virtualize.log.destination=file -Dparasoft.virtualize.log.level=1 -Dparasoft.virtualize.log.file.location=[desired path]/jdbcproxy.log -Dparasoft.virtualize.server.url=http://VirtualizeServerHostName:9080 -Dparasoft.virtualize.driver.proxy.direct=false -Dparasoft.virtualize.driver.register.jdbcproxydriver.in.drivermanager=true |
In Virtualize 9.5 and higher:
set JAVA_OPTIONS=%JAVA_OPTIONS% -Dparasoft.virtualize.group.id=ParaBank -Dparasoft.virtualize.server.url=http://VirtualizeServerHostName:9080 -Dparasoft.virtualize.driver.proxy.direct=false -Dparasoft.virtualize.driver.regis-ter.jdbcproxydriver.in.drivermanager=true |
Video Tutorial: Virtualizing a Database Over JDBCIn this video, you'll learn how to virtualize a database over JDBC. |