Selecting and enabling JDBC data sources in WebSphere® Application Server
For each JDBC data source that you want to record or virtualize, you must use IBM® Rational® Integration Tester to select and enable the data source.
About this task
Each application under test will normally connect to databases using JDBC data sources that are looked up by means of a JNDI reference. You can use Rational® Integration Tester to view the JDBC data sources that are available in your IBM® WebSphere® Application Server installation.
- The JDBC data source for connecting to the live database. This
data source is not created automatically, so you must create it manually
in WebSphere®
Application Server.Note: For information about manually creating a data source that connects to a live database, see the WebSphere® Application Server information center.
- The JDBC data source for connecting to the simulation database.
Depending on the version of
Rational® Integration
Tester and
the database management system software that you are using, the data
source that connects to the simulation database might be created automatically
in WebSphere®
Application Server by
Rational® Integration
Tester.
Rational® Integration Tester version Database management system Data source that connects to the simulation database 8.5.1 or later IBM® Db2®, Oracle, Microsoft™ SQL Server, MySQL Created automatically by Rational® Integration Tester Versions earlier than 8.5.1 Db2® Created automatically by Rational® Integration Tester Oracle, Microsoft™ SQL Server, MySQL Must be created manually in WebSphere® Application Server - The Rational® Integration Tester data source, which is created automatically in WebSphere® Application Server when you enable a WebSphere® Application Server data source in Rational® Integration Tester for recording or virtualization.
Procedure
- In Rational® Integration Tester, click IBM on the Physical View toolbar of the Physical View of Architecture School.
-
On the IBM menu,
click IBM WebSphere Application Server.
The New IBM WebSphere Application Server window is displayed.
- Specify the WebSphere® Application Server host name and the port to connect to. Click Test Transport to test the connection to WebSphere® Application Server.
-
Click the Data Sources tab.
The data sources that are configured on WebSphere® Application Server are displayed.
-
Select the data source for which you want
to enable SQL recording and database stubbing and click Enable
GH JDBC Driver.
Alternatively, to stop SQL recording and database stubbing for the selected data source, click Disable GH JDBC Driver.
Note: If you need to create a data source that connects to a simulation database:- Select the data source that you configured to connect to the simulation database.
- If the Rational® Integration Tester project contains more than one database, a confirmation prompt is displayed.
- Select the database that you want to enable for SQL recording and database stubbing.
- Select the connection string that matches the data source that you want to enable for database recording.
Note: If you are using Rational® Integration Tester with WebSphere® Application Server Network Deployment:- Ensure that the Config tab contains connection settings for the relevant deployment manager if you are using federated servers and one or more deployment managers.
- The Scope column on the Data Sources tab indicates the scope (cell, node, or server level) at which each displayed data source is being managed.
- By having a physical connection to the relevant deployment manager, you can configure data sources at any level in the WebSphere® Application Server hierarchy.
The Data Source Status column refreshes to confirm that the selected data source is now enabled (or disabled) for database stubbing.
To facilitate enabling SQL recording and database stubbing, Rational® Integration Tester defines two new data sources and renames the original data source in JNDI.Note: If you are using Rational® Integration Tester with WebSphere® Application Server Network Deployment, and try to configure a data source where the JDBC driver is not enabled at the correct level in the hierarchy, an error message is displayed. Clicking OK to close the dialog box displays a message that prompts you to restart all WebSphere® Application Server instances that are impacted by the data source changes. When the instances are restarted, the changes take effect on all those instances.
Results
- The application is hosted on the server that is running WebSphere® Application Server
- The server is using the specified data source