WebSphere support for data sources
The programming model for accessing a data source is as follows:
- An application retrieves a DataSource object from the JNDI naming space.
- After the DataSource object is obtained, the application code calls getConnection() on the data source to get a Connection object. The connection is obtained from a pool of connections.
- Once the connection is acquired, the application sends SQL queries or updates to the database.
WAS supports the followin data source versions...
- J2EE 1.2
- J2EE 1.3
- J2EE 1.4
Versions differ in how connections are handled. However, from an application point of view, they look the same.
To create a data source:
- Create a JDBC provider, which provides the vendor-specific data source classpath.
- Create a data source.
The JDBC data source encapsulates the database-specific connection settings.