To create connections between an application and a relational
database, WebSphere Application Server uses the driver implementation classes
that are encapsulated by the JDBC provider.
Before you begin
Each JDBC provider is essentially an object that represents vendor-specific
JDBC driver classes to 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 your database and application requirements.
About this task
Configure at least one JDBC provider for each database server that
you plan to use at a particular scope within your WebSphere Application Server
environment.
Procedure
- Open the administrative console.
- Click Resources > JDBC Providers.
- Select the scope at which applications
can use the JDBC provider. (This scope becomes the scope of your data source.)
You can choose a cell, node, cluster, or server. For more information,
see Administrative console scope settings
.
- Click New.
Note: If Java
script is disabled for your browser, you do not see the three drop-down lists
that are described in the next three steps (for database type, provider type,
and implementation type) . Instead, you see a single drop-down box that lists all JDBC
provider choices simultaneously (inclusive of every database, provider, and
implementation type).
- Use the first drop-down list to select the
database type of the JDBC provider you need to create.
If the
list of database types does not include the product that you want to use,
select User-Defined. This selection triggers the console to display
your provider type as User-defined JDBC provider, and your implementation
type as User-defined. Consult your database documentation for the JDBC
class files, data source properties, and so on that are required for your
user-defined provider. Input these specifics on the JDBC properties pages
that are described in steps eight through ten of this task. You also need
to input some of this information on the properties pages that are part of
the data source configuration task.
- From the second drop-down list, select your
JDBC provider type.
- From the third drop-down list, select the
implementation type that is necessary for your application. If
your application does not require that connections support two-phase commit
transactions, choose Connection Pool Data Source. Choose XA Data
Source, however, if your application requires connections that support
two-phase commit transactions. Applications that use this data source configuration
have the benefit of container-managed transaction recovery.
- Click Next to view the general property
settings page for your JDBC provider.
- Ensure that all required properties have valid
values. For more information, see JDBC
Provider settings.
- Click Apply to view the page with your
new JDBC provider settings. Note that two active data source
links now appear under the Additional Properties heading on this page.
To set up a data source, click the link that corresponds to the type required
by your application, the Version 4 data source or the later version data source.
(For more information, refer to the section entitled "Choice of data source"
in the Data sources
topic.)
- Click OK to return to
the JDBC providers page, where your new JDBC provider appears in the list.
Remember: If you modify the class path or native library
path of a JDBC provider, 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.