...
- Copy the Parasoft JDBC Driver jar file to the global
lib
directory that is directly undertomcat
root. - Edit each context.xml file that contains the resource definition for the data source as follows (there may be several context.xml files to edit since they can be found in
webapps
as well as at the global config level):- Modify
type
to the class name of the Parasoft Data Source you are going to use. The available values depend on the database vendor JDBC driver currently in use. See JDBC Driver Implementation Classes for details. - Add
factory
andfactory
and set it tocom.parasoft.xtest.jdbc.virt.driver.ParasoftDataSourceFactory
Set
virtualizeServerUrl
andvirtualizeGroupId
.
For example:Code Block <Resource name="<original name>" auth="<original auth>" type="com.parasoft.xtest.jdbc.virt.driver.oracle.OracleDataSource" factory="com.parasoft.xtest.jdbc.virt.driver.ParasoftDataSourceFac-tory" virtualizeGroupId="hibernateOracle" virtualizeServerUrl="http://localhost.parasoft.com:9080" user="<original user>" password="<orignal password>" url="<original url>"/>
The required properties (
virtualizeGroupId
andvirtualizeServerUrl
) are set on the resource as well. No system properties are needed.
Do not change any fields starting withoriginal
(includingurl,
name,
user,
andpassword
). In the above case, theurl
field might be set tojdbc:oracle:thin:@//host:1521/db
- Modify
...
- Copy the Parasoft JDBC Driver jar file to the global
lib
directory that is directly under tomcat root. - In the server.xml or context.xml file, add a new resource with information to call the original data source.
- Modify the name of this resource to be the JNDI data source name that the AUT will call. This should be the name of the original data source. You can modify the original data source’s name to something like
jdbc/nameLIVE
[user defined]. - Add an attribute called
targetDataSource
. This will be the original data source and JNDI name. This is how the new datasource will call the original data source. - Add a
factory
and set it tocom.parasoft.xtest.jdbc.virt.driver.ParasoftDataSourceFactory
. - Set
virtualizeServerUrl
andvirtualizeGroupId
.
- Modify the name of this resource to be the JNDI data source name that the AUT will call. This should be the name of the original data source. You can modify the original data source’s name to something like
For example, assume you have this original data source:
...
- The required properties (
virtualizeGroupId
andvirtualizeServerUrl
) are set on the resource as well. No system properties are needed. - A recommended best practice is to add
virtualizeServerPath
to indicate which Virtualize server path the driver will send request information to. Once your asset is created, you will need to deploy it on that same path. This allows you to send data only to this single asset.