Enabling client use of data sources

If a Java EE client application accesses a database directly, you must 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, it is recommended that your client application access the database through an enterprise bean.

About this task

WebSphere Application Server and the Application Client for WebSphere Application Server do not provide client database drivers to be used directly from a Java EE client application. You can contact your 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, it is recommended that your 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 that are supported on WebSphere Application Server, see the WebSphere Application Server prerequisite website.

Procedure

  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 your 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 your client application.
    2. Configuring a new data source This describes the client properties of the database your client application uses.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 3:08:41 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-nd-zos&topic=tcli_datasor
File name: tcli_datasor.html