Installation considerations for the JDBC proxy

HCL Quality Server includes a JDBC proxy. Before you install and configure the JDBC Proxy, it is important to determine which live databases are to be stubbed and whether there are any database schema or data source requirements.

Determining live databases for stubbing

Identify in advance the live databases that you want to record and or stub. For each live database, determine whether access is taking place by using either the Java DriverManager or through the use of DataSources, which will inform the installation requirements and configuration changes.

Consider the following guidelines:
  • If an application that uses JDBC to access the database is a stand-alone application, it will use the DriverManager and the JDBC Proxy must be installed in each application.
  • If an application that uses JDBC to access the database is a hosted application, it will use DataSources and the JDBC Proxy must be installed on the application servers that host them, not in the applications.

HCL OneTest™ API does not have to be connected to any of the other applications that use JDBC to access the live database. Instead, as each driver starts, it registers with the HCL Quality Server. HCL OneTest API and the HCL Quality Server dashboards are then used to control recording and stubbing.

As the configuration details differ from application to application and more so from application server to application server, you must refer to the different vendor documentation, as an example, DriverManager setup is described in Deploying JDBC proxy into Apache Tomcat and DataSource setup is described in Selecting and enabling JDBC data sources in WebSphere® Application Server.

Determining database schema requirements

To stub a database, you must have a second schema (a "simulation schema") in the same version of the database software as the live database. This simulation schema can be another schema on the same database server or on a different server but the software version numbers must match.
Note: This second schema is not required if you are planning to use the driver to record only SQL actions.
A database administrator must use tools that are supplied with the database software to create the required simulation schemas and must provide the login details to any HCL OneTest API/HCL OneTest Virtualization users who use the JDBC Proxy.
Note: The login details must be for a user with sufficient privileges to administer the database, in particular, the rights to create new tables.

Determining data source requirements

If you are using IBM® WebSphere Application Server or Oracle WebLogic, you must complete the following tasks before you can create and configure a data source for SQL recording and database stubbing.

  • Set up a data source for each logical database that is configured in HCL OneTest API because a data source is needed for each simulation database.
  • Ensure that each data source remains synchronized with the simulation database settings for the physical database resource.

For information about using HCL OneTest API to create and configure IBM DB2® data sources and other data sources for SQL recording and database stubbing, see Selecting and enabling JDBC data sources in WebSphere Application Server.