Configure the JDBC agent

This task describes how to configure the JDBC agent. The JDBC agent is used to virtualize both J2EE and J2SE applications that are using JDBC™ API to access persistent storage.

Service Virtualization provides these two components:

  • JDBC agent. You configure the JDBC agent in Service Virtualization. The agent listens for requests from the JDBC driver.
  • JDBC driver. You install the JDBC driver in your application under test. The driver communicates remotely with the JDBC agent in Service Virtualization. It intercepts each JDBC API call and depending on the current service mode, forwards the traffic accordingly. If the virtual service is in either Standby or Learning mode, the driver forwards the traffic to the actual JDBC driver. If the virtual service is in Simulating mode, the virtual service simulates the API response.

    The JDBC driver is uniquely generated according to the configuration of the JDBC agent and agent host that you define in Service Virtualization. The driver is invoked only if either a virtualization JDBC connection string is used (J2SE), or if the virtual data source is explicitly created and used by the application (J2EE). If a non-virtualization connection string or data source is used, the virtualization JDBC driver is inactive and has no impact on the application under test.

To configure the JDBC agent:

  1. Prerequisites:

    The following types of integration scenarios are supported:

    • A J2SE application using JDBC 3.0 or 4.0/4.1 API.
    • A Java™ based application deployed on a J2EE application server (J2EE version 1.4 or later).

  2. Configure the agent settings:

    From the main Service Virtualization menu, select Tools > Options. On the Agents Page, select JDBC Agent. For user interface details, see the JDBC agent settings.

  3. Reconfigure a standard J2SE or J2EE application:

  4. Configure your application server: