DB2 for z/OS Local JDBC Provider
(RRS)
The DB2 for zOS Local JDBC Provider (RRS) is for use
with the DB2 for 390 and z/OS Legacy JDBC driver. It can be used only with
WebSphere Application Server for z/OS. This provider supports the creation
of WebSphere Application Server for z/OS v5.0 and v4.0 data sources. It also
uses z/OS Resource Recovery Services (RRS) to coordinate transactions across
multiple resource managers using two-phase commit processing.
The
DB2 for zOS Local JDBC Provider (RRS) allows applications to use both JDBC
and Structured Query Language in Java (SQLJ) access to DB2 databases. Use
of SQLJ with Container Managed Persistence (CMP) is not supported under this
provider.
To use this provider, the legacy DB2
for z/OS JDBC Driver, also called the DB2 JDBC/SQLJ driver, must be
installed and configured to the WebSphere Application Server. Refer to the
topic Using a DB2 for z/OS Local JDBC Provider (RRS) with WebSphere Application Server for z/OS.
The following configuration information is provided
in a template for the DB2 for zOS Local JDBC Driver Provider (RRS), and is
automatically filled in when you select this provider.
Data
source implementation:
com.ibm.db2.jcc.DB2ConnectionPoolDataSource
This
DB2 data source allows WebSphere Application Server for z/OS to perform connection
pooling. Note that when you configure the data source, you must specify a
name for the data source definition.
This provider
requires JDBC driver files:
The driver requires DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2DataStoreHelper
It also requires a valid authentication alias. When
res-auth = CONTAINER is used, however, it is permissible to not specify any
authentication alias. In this case, the user identity associated with a connection
created by the data source is the user identity associated with the current
thread at the time a connection request is made.
The
DB2 JDBC/SQLJ driver requires the following properties:
- databaseName The location name of the target database, used when
establishing connections using this data source.
Optional properties: DB2
supports additional connection properties for the DB2 JDBC / SQLJ driver;
set them as custom properties on the data source. For information about
these optional data source properties, consult the Application Programming
Guide and Reference for Java for your version of DB2 for z/OS.
DB2 Universal JDBC Driver provider The DB2 Universal
JDBC Driver is an architecture-neutral JDBC driver for distributed and local
DB2 access. Because the DB2 Universal Driver architecture is independent of
any particular JDBC driver connectivity or target platform, it allows both
Java connectivity (Type 4) or Java Native Interface (JNI) based connectivity
(Type 2) in a single driver instance to DB2. The DB2 Universal JDBC Driver
provider supports both JDBC and Structured Query Language in Java (SQLJ) access
to DB2 databases, as well as SQLJ use with CMP.
The DB2 Universal JDBC Driver
provider supports the data source:
com.ibm.db2.jcc.DB2ConnectionPoolDataSource
This
data source can support two-phase transactions (for Application Server on
the z/OS platform only). If you set the DB2 Universal JDBC Driver for type
2 connectivity, Application Server on z/OS uses RRS to process transactions,
including two-phase commit transactions. When used with driver type 4 connectivity,
this data source implementation supports one-phase transactions only.
The
provider requires JDBC driver files:
- db2jcc.jar This is the DB2 Universal JDBC Driver jar
file, which is located in the DB2 installation directory. Specify the fully-qualified
path of this jar file for the value of your WebSphere variable ${DB2UNIVERSAL_JDBC_DRIVER_PATH}.
For example:
<classpath>${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar </classpath>
Application
Server uses this value to define the JDBC provider.
- db2jcc_license_cisuz.jar This DB2 Universal JDBC Driver
license file is included with DB2. The installation program for DB2 places
the license file in the same DB2 directory as db2jcc.jar.
Therefore your variable ${DB2UNIVERSAL_JDBC_DRIVER_PATH} ultimately
points to both files.
Tip: The driver file db2jcc_license_cu.jar ships
with Application Server in the WAS_HOME/universalDriver/lib directory.
It is automatically set to the ${DB2UNIVERSAL_JDBC_DRIVER_PATH} variable.
Although this driver file does not provide access to DB2 for z/OS, you can
leave it as part of the variable definition.
- The native files of .so type are required by the DB2
Universal JDBC Driver in WebSphere Application Server for z/OS. Set the library
path variable ${DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH} to the
directory that contains the native files. (In cases that do not require native
files, set the DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH to null.)
The DB2 Universal JDBC Driver requires
DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper
This driver also requires a valid authentication alias if the driverType
property (see properties below) is set to 4. If the driverType property is
set to 2, a component-managed authentication alias must be specified to use
the data source with res-auth APPLICATION. In the case where driverType 2
is specified and the data source is used with res-auth CONTAINER, you can
specify a container-managed authentication alias; however, it is not required.
If you do not specify a container-managed alias, the user identity associated
with a connection created by the data source will be the user identity associated
with the current thread at the time the connection is obtained.
It requires
the following properties:
- databaseName This is an actual database name if the driverType
is set to 4, or a locally cataloged database name if the driverType
is set to 2.
- driverType The JDBC connectivity type of a data source. There
are two permitted values: 2 and 4. If you want to use Universal JDBC
Driver type 2 , set this value to 2. If you want to use Universal JDBC Driver
type 4 , set this value to 4.
- serverName The TCP/IP address or host name for the Distributed
Relational Database Architecture (DRDA) server. Provide a value for this
property only if your driverType is set to 4. This property
is not required if your driverType is set to 2.
- portNumber The TCP/IP port number where the DRDA server resides.
Provide a value for this property only if your driverType is set to 4.
This property is not required if your driverType is set to 2.
Optional properties: DB2 supports additional
connection properties for the DB2 Universal JDBC Driver; set them as custom
properties on the data source. For information about these optional data
source properties, consult the Application Programming Guide and Reference
for Java for your version of DB2 for z/OS.
DB2 Universal JDBC Provider (XA) The XA DB2 Universal
JDBC provider uses the DB2 Universal JDBC Driver to provide access to DB2
databases. The Universal JDBC Driver supports Java communication-based connectivity
(driver Type 4). For XA transactions, driver type 2 connectivity is
not
supported by the DB2 Universal JDBC Driver on WebSphere Application Server
for z/OS.
Requirement: To use this provider,
you must have the DB2 Universal JDBC Driver for DB2 Version 7 or DB2 Version
8 installed and configured for WebSphere Application Server for z/OS, or you
must have the z/OS Application Connectivity to DB2 for z/OS feature installed
and configured for WebSphere Application Server for z/OS. Refer to the topic
Using the DB2 Universal JDBC Driver to access DB2 for z/OS.
The
DB2 Universal JDBC Driver provider (XA) allows applications to use both JDBC
and Structured Query Language in Java (SQLJ) access to DB2 databases. SQLJ
use with CMP is also supported.
This provider does not support the creation
of Version 4.0 data sources.
The DB2 Universal JDBC Driver provider
(XA) supports the two phase data source:
com.ibm.db2.jcc.DB2XADataSource
The provider requires JDBC driver files:
- db2jcc.jar This is the DB2 Universal JDBC Driver jar
file, which is located in the DB2 installation directory. Specify the fully-qualified
path of this jar file for the value of your WebSphere variable ${DB2UNIVERSAL_JDBC_DRIVER_PATH}.
For example:
<classpath>${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar </classpath>
Application
Server uses this value to define the JDBC provider.
- db2jcc_license_cisuz.jar This DB2 Universal JDBC Driver
license file is included with DB2. The installation program for DB2 places
the license file in the same DB2 directory as db2jcc.jar.
Therefore your variable ${DB2UNIVERSAL_JDBC_DRIVER_PATH} ultimately
points to both files.
Tip: The driver file db2jcc_license_cu.jar ships
with Application Server in the WAS_HOME/universalDriver/lib directory.
It is automatically set to the ${DB2UNIVERSAL_JDBC_DRIVER_PATH} variable.
Although this driver file does not provide access to DB2 for z/OS, you can
leave it as part of the variable definition.
- The native files of .so type are required by the DB2
Universal JDBC Driver in WebSphere Application Server for z/OS. Set the library
path variable ${DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH} to the
directory that contains the native files. (In cases that do not require native
files, set the DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH to null.)
The driver requires
DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper
It also requires a valid authentication alias.
The DB2 Universal JDBC
Driver requires the following properties:
- databaseName This is a locally cataloged database name.
- driverType This is the JDBC connectivity type of a data source. If
you are running a version of DB2 prior to DB2 V8.1 FP6, you are restricted
to using only the type 2 driver.
- serverName The TCP/IP address or host name for the Distributed
Relational Database Architecture (DRDA) server. Provide a value for this
property only if your driverType is set to 4. This property
is not required if your driverType is set to 2.
- portNumber The TCP/IP port number where the DRDA server resides.
Provide a value for this property only if your driverType is set to 4.
This property is not required if your driverType is set to 2.
Optional properties: DB2 supports additional
connection properties for the DB2 Universal JDBC Driver; set them as custom
properties on the data source. For information about these optional data
source properties, consult the Application Programming Guide and Reference
for Java for your version of DB2 for z/OS.