This topic introduces the Parasoft JDBC Driver, which is used to record database queries along with their corresponding resulting data. Once the Parasoft JDBC Driver is configured and the application under test (AUT) is set up to communicate with it, you can use the JDBC Controller to switch modes (e.g., such as passthrough, record, virtualize, and so on) from the UI without having to restart the application server.
...
Database virtualization (described in データベースの記録) is performed using the Parasoft JDBC Driver along with the JDBC Controller. The Parasoft JDBC Driver is a special JDBC driver that can act as a "man - in - the - middle" between the application and its regular JDBC driver. It implements the JDBC APIs, which allows it to be configured into Java application servers just like any standard database driver.
...
- Delegate JDBC calls (SQL queries) to the original driver—and driver and optionally send the queries and their associated ResultSets to Parasoft Virtualize Server to be recorded. With failover mode, queries will be automatically rerouted to Parasoft Virtualize Server if a failure (SQL exception) occurs with the live database.
- Delegate the queries to a Parasoft Virtualize Server, which can in turn (once a SQL Responder in a virtual asset is configured) respond to the queries in the same manner as the original database connection. With hybrid mode, queries will be automatically delegated to the original driver if no matching "virtual" responses are found.
...
Through the Virtualize UI (or Environment Manager UI), you can use JDBC Controllers to control the settings of a single Parasoft JDBC Driver or a group of drivers. For instance, you can have a single point of control for a JDBC drivers deployed on clustered environments. Or, if you have multiple drivers (or data sources) used within a single AUT, you can orchestrate their deployment configuration in unison (e.g.for example, you can have them all switch modes simultaneously).
...
Parasoft Virtualize supports the recording and virtualization of SQL SELECT statements. Stored procedures and function functions with multiple in, out, and inout parameters are supported, including Cursor/ResultSet parameters. For Oracle and DB2, recording stored procedures that have multiple out parameters that each return a cursor is supported.
When queries are being routed to the actual JDBC driver (i.e.that is, during recording or passthrough mode), INSERT, UPDATE, and DELETE queries are delegated to the original database/driver.
When queries are being sent to a virtual asset, calls on Statement.executeUpdate() will return the value 0; Parasoft Virtualize will not emulate the actual behavior of INSERT, UPDATE, and DELETE statements. As a result, any data that is recorded into Virtualize will not be modified by these SQL queries.
...
Results are recorded either when the CallableStatement
is closed or when all the declared out parameters and results sets have been read in. For ResultSets to be recorded, close must be called on them. Calling close on Statement or PreparedStatement will mean that no data will be recorded from the ResultSet. Recorded column names are based upon the interface method used to retrieve them. Calling ResultSet.getString(String columnLabel) will use the columnLabel in the recorded data. If a column index is used, the recorded data will use the index number as the column label.
...
Stored procedures are supported by Virtualize and the Parasoft JDBC Driver through the CallableStatement interface. Virtualize will emulate the return and out parameter values of a stored procedure without any visibility into its implementation. If the stored procedure performs UPDATE, INSERT, or DELETE queries, data recorded in Virtualize will not be affected by such queries.
...