Chapter 9. Accessing relational databases from WebSphere 355
For an EJB, the sequence is:
1. An EJB performs a JNDI lookup of a data source connection factory and issues a
getConnection() request.
2. The connection factory delegates the request to a connection manager.
3. The connection manager looks for an instance of a connection pool in the application
server. If no connection pool is available, the manager uses the
ManagedConnectionFactory to create a physical, or nonpooled, connection.
Version 4 data source
WebSphere Application Server V4 provided its own JDBC connection manager to handle
connection pooling and JDBC access. This support is included with WebSphere Application
Server V8.5 to provide support for J2EE 1.2 applications. If an application chooses to use a
Version 4 data source, the WebSphere Application Server V8.5 application has the same
connection behavior as in Version 4 of the application server.
Use the Version 4 data source for the following purposes:
J2EE 1.2 applications: All EJB beans, JDBC applications, or Version 2.2 servlets must use
the Version 4 data source.
EJB 1.x modules with 1.1 deployment descriptor: All of these modules must use the
Version 4 data source.
9.2 Steps to define access to a database
The following steps are involved in creating a data source:
1. Verify that connection to the database server is supported by WebSphere Application
Server. Refer to the following website for more information:
http://www-304.ibm.com/support/docview.wss?rs=180&uid=swg27006921#8.5
2. Ensure that the database is created and can be accessed by the systems that will use it.
3. Ensure that the JDBC provider classes are available on the systems that will access the
database. If you are not sure which classes are required, consult the documentation for
the provider.
4. Create an authentication alias that contains the user ID and password that will be used to
access the database.
5. Create a JDBC provider. The JDBC provider gives the class path of the data source
implementation class and the supporting classes for database connectivity. This is
vendor-specific.
The information center provides information about JDBC driver support and requirements.
To determine if your provider is supported, refer to the JDBC Provider Summary article at
the following website:
http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=/com.ibm.websphe
re.nd.doc/ae/udat_minreq.html