352 WebSphere Application Server V8.5 Administration and Configuration Guide for the Full Profile
9.1 JDBC resources
The JDBC API provides a programming interface for data access of relational databases from
the Java programming language. WebSphere Application Server V8.5 supports the following
JDBC APIs:
JDBC 4.0
JDBC 3.0
JDBC 2.1 and Optional Package API (2.0)
In the following sections, we explain how to create and configure data source objects for use
by JDBC applications. This is the only method to connect to a database if you intend to use
connection pooling and distributed transactions.
The following database platforms are supported for JDBC:
DB2
Oracle
Sybase
IBM Informix®
SQL Server
Apache Derby (test and development only)
Third-party vendor JDBC data source using SQL99 standards
9.1.1 JDBC providers and data sources
A data source represents a real-world source of data, such as a relational database. When a
data source object is registered with a JNDI naming service, an application can retrieve it
from the naming service and use it to make a connection to the associated database.
Information about the data source and how to locate it, such as its name, the server on which
it resides, its port number, and so on, is stored in the form of
properties on the DataSource
object. Storing this information in this manner makes an application more portable because it
does not need to hard code a driver name, which often includes the name of a particular
vendor. It also makes maintaining the code easier because if, for example, the data source is
moved to a different server, all that needs to be done is to update the relevant property in the
data source. None of the code using that data source needs to be touched.
To increase application performance and reduce workload on the database, connections to it
are typical pooled. In other words, when the application closes the connection, the connection
is returned to a connection pool, rather than being destroyed.
Data source
classes and JDBC drivers are implemented by the data source vendor. By
configuring a JDBC provider, you provide information about the set of classes that are used to
implement the data source and the database driver. Also, you provide the environment
settings for the DataSource object. A driver can be written purely in the Java programming
language or in a mixture of the Java programming language and the Java Native Interface
(JNI) native methods.
In the next sections, we describe how to create and configure data source objects and how to
configure the connection pools used to serve connections from the data source.