Configure a JDBC provider using the administrative console
To create connections between an application and a relational database, the application server uses the driver implementation classes that are encapsulated by the JDBC provider.
Each JDBC provider is essentially an object that represents vendor-specific JDBC driver classes to the application server, for establishing access to that particular vendor database. JDBC providers are prerequisites for data sources, which supply applications with the physical connections to a database. Consult the JDBC provider table to identify the appropriate JDBC provider for the database and application requirements.
(zos)
Deprecated feature: The application server no longer supports the DB2 for 390 and z/OS Legacy JDBC driver and the corresponding JDBC provider, the DB2 for zOS Local JDBC provider (RRS). Use the DB2 Using IBM JCC driver or DB2 Universal JDBC driver to connect to DB2 for z/OS.depfeat
Configure at least one JDBC provider for each database server to use at a particular scope within the application server environment.
- Open the administrative console.
- Click Resources > JDBC > JDBC Providers.
- Select the scope at which applications can use the JDBC provider. The scope selected becomes the scope of any data source that you associate with this provider. We can choose a cell, node, cluster, or server. For more information about scope and how it can affect resources, see the information center topic on administrative scope settings.
- Click New. This action causes the Create a new JDBC Provider wizard to launch.
- Use the first drop-down list to select the database type of the JDBC provider that create.
The User-Defined option: Select User-Defined for your database type if you encounter either of the following scenarios:
- You do not see the database type.
- We cannot select the JDBC provider type that we need in the next step.
The user-defined selection triggers the wizard panel to display your provider type as a user-defined JDBC provider, and the implementation type as user-defined. Consult the database documentation for the JDBC driver class files, data source properties, and so on, that are required for the user-defined provider. We must supply this information about the next two panels:
- database class path
- database-specific properties
- Select the JDBC provider type if it is displayed in the second drop-down list. Select Show Deprecated to trigger the display of both current and deprecated providers. If we cannot find the provider in this expanded list, then select User-Defined from the previous list of database types.
(zos) Avoid trouble: The product issues a DSRA360 error message if you select the DB2 for z/OS Local JDBC Provider (RRS) provider. In Version 6.1 and later, the application server completely removes support for the DB2 for z/OS Local JDBC Provider (RRS) provider.gotcha
- From the third drop-down list, select the implementation type that is necessary for the application. If the application does not require that connections support two-phase commit transactions, choose Connection Pool Data Source. Choose XA Data Source, however, if the application requires connections that support two-phase commit transactions. Applications that use this data source configuration have the benefit of container-managed transaction recovery.
After you select an implementation type, the wizard fills the name and the description fields for the JDBC provider. We can type different values for these fields; they exist for administrative purposes only.
- Click Next to see the Enter database class path information wizard panel.
- In the class path field, type the full path location of the database JDBC driver class files. Your class path information becomes the value of the WebSphere environment variable that is displayed on this panel, in the form of ${DATABASE_JDBC_DRIVER_PATH}. The application server uses the variable to define the JDBC provider; this practice eliminates the must specify static JDBC class paths for individual applications. Remember that if we do not provide the full, correct JDBC driver class path for the variable, the data source ultimately fails. If the field already displays a fully qualified class path, we can accept that variable definition by completing the rest of this wizard panel and clicking Next.
The application server supports multiple versions of the selected JDBC driver for the DataDirect ConnectJDBC type 4 driver for MS SQL Server. Each version of the JDBC driver has a unique class path. Select the appropriate version of the JDBC driver so the class path is populated correctly.
- Use the Native library path field to specify additional class files that the JDBC driver might require to function properly on the application server platform. Type the full directory path name of these class files.
Avoid trouble: For an Oracle OCI driver as the JDBC provider, specify the path to where the native libraries are stored. If we do not specify a native library path, the first time you try to connect using this provider, class loader errors occur. gotcha
- Click Next to see a summary of your JDBC provider settings.
- Click Finish if you are satisfied with the JDBC provider configuration. You now see the JDBC provider collection panel, which displays the new JDBC provider in a table along with other providers configured for the same scope.
What to do next
The next step is to create a data source to associate with the JDBC provider. For detailed information, see the information center topic on configuring a data source using the administrative console.
Remember: If we modify configuration of a JDBC provider, like the class path, native library path, or custom properties, click OK and then restart every application server within the scope of that JDBC provider. Otherwise, the new configuration does not work and you receive data source failure messages.
Subtopics
- JDBC provider collection
Use this page to view JDBC providers. The JDBC provider object encapsulates the specific JDBC driver implementation class for the data sources defined and associate with the provider.
Related concepts
JDBC providers Data sources
Related tasks
Configure a data source using the administrative console
Data source minimum required settings, by vendor Data source settings Administrative console scope settings