+

Search Tips   |   Advanced Search

Enable client use of data sources

If a Java EE client application accesses a database directly, provide the database drivers on the client machine, and configure the data source provider (JDBC provider) and data sources. Instead of accessing the database directly, IBM recommends that the client application access the database through an enterprise bean.

WebSphere Application Server and the Application Client for WAS do not provide client database drivers to be used directly from a Java EE client application. We can contact the database vendor to get client database driver code and licenses.

Data sources configured on the server and looked up on the client do not participate in global transactions.

Instead of accessing the database directly, IBM recommends that the client application access the database through an enterprise bean. This technique eliminates the need to have database drivers on the client machine, because the database access is handled by the enterprise bean running on WebSphere Application Server. It also enables the client application to take advantage of the pooling and additional database functions provided by the server.

For a current list of data source providers supported on WAS, see the WAS prerequisite website.


Tasks

  1. For direct access from a client to the database, install the client database drivers on the client machine. For information about installing database drivers, see the documentation provided by the database vendor.

  2. Configure a data source provider and a data source for the client application Use the Application Client Resource Configuration Tool (ACRCT) to define the data source provider and a data source in the EAR file for the client application. The client application uses this configuration to resolve and create an instance of the data source provider and data source.

    1. Configure a new data source provider. This provider describes the JDBC database implementation for our client application.
    2. Configure a new data source This describes the client properties of the database the client application uses.


Subtopics