These properties vary according to the database vendor
requirements for JDBC driver implementations. You must set the appropriate
properties on every data source that you configure. These settings
are for a DB2® data source that
is running on z/OS® and will
be accessed by applications in an application server that is also
running on z/OS.
You can configure the following types of providers:
- DB2 Using IBM JCC Driver
This provider
is a one-phase commit JCC provider for DB2 that
uses the IBM Data Server Driver
for JDBC and SQLJ. The IBM Data
Server Driver for JDBC and SQLJ is the next generation of the DB2 Universal JDBC driver. Data
sources you create under this provider support only 1-phase commit
processing, unless you use the type 2 JDBC driver with the application
server for z/OS. If you run
the application server on z/OS with
the type 2 driver, the driver uses RRS and supports 2-phase commit
processing.
This provider:
- Is configurable in version 7.0 and later nodes
- Supports the following one-phase data source:
com.ibm.db2.jcc.DB2ConnectionPoolDataSource
- Requires the following JDBC driver files:
- Uses the following class paths:
${DB2_JCC_DRIVER_PATH}/db2jcc4.jar
${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar
${DB2_JCC_DRIVER_PATH}/db2jcc_license_cisuz.jar
${PUREQUERY_PATH}/pdq.jar
${PUREQUERY_PATH}/pdqmgmt.jar
Avoid trouble: When specifying the directory path for
${DB2_JCC_DRIVER_PATH},
${UNIVERSAL_JDBC_DRIVER_PATH}, and ${DB2_JCC_DRIVER_PATH} do
not specify a path that contains any special characters as identified
in section 2.4.3 of the
RFC 2396: Uniform Resource Identifiers
(URI): Generic Syntaxgotcha
Attention: ${PUREQUERY_PATH}/pdq.jar
and ${PUREQUERY_PATH}/pdqmgmt.jar are added to
the class path as a convenience and are only required if the JDBC
provider is used by pureQuery applications. If you are using this
JDBC provider with pureQuery applications, set the PUREQUERY_PATH variable
to the directory where IBM Optim™ pureQuery Runtime JAR files
are stored.
- Uses the following native library path:
${DB2_JCC_DRIVER_NATIVEPATH}
If
driverType is set to 2, the DB2_JCC_DRIVER_NATIVEPATH variable
should be set to the directory in your DB2 client
installation that contains the native driver libraries. If driverType
is set to 4, the native path is not used.
- Requires the following DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper
- Requires a valid authentication alias.
- Requires 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 the type
2 driver, set this value to 2. If you want to use 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.
- useTransactionRedirect Configure this property as a data
source custom property if your backend uses the Database Partitioning
Feature (DPF) and your partitioning key remains constant throughout
a transaction. Activating the property affects how the IBM Data Server Driver for JDBC and SQLJ directs
each connection request that begins a transaction with DB2. The JDBC driver is triggered to send those
connection requests to the DPF node that contains the target data
of the first directable statement in the transaction, if such a statement
exists. DB2 then directs the
SQL statement to different partitions as needed; the transaction proceeds
normally from the viewpoint of the application server.
You can use useTransactionRedirect for both driverType
2 and driverType 4 data sources. To configure the property,
use either the wsadmin scripting tool or the administrative console
page, Java EE resource provider
or connection factory custom properties collection. Assign the property
the value of true.
- DB2 Using IBM JCC Driver (XA)
The DB2 Using IBM JCC Driver (XA) is a two-phase commit JCC
provider for DB2 that uses the IBM Data Server Driver for JDBC
and SQLJ. The IBM Data Server
Driver is the next generation of the DB2 Universal
JDBC driver. Data sources that you create under this provider support
the use of XA to perform two-phase commit processing.
Avoid trouble: Do not use the type 2 JDBC driver on the application
server for z/OS.
gotcha
This
provider:
- Is configurable in version 7.0 and later nodes.
- Supports the following two-phase data source:
com.ibm.db2.jcc.DB2XADataSource
- Requires the following JDBC driver files:
- Uses the following class paths:
${DB2_JCC_DRIVER_PATH}/db2jcc4.jar
${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar
${DB2_JCC_DRIVER_PATH}/db2jcc_license_cisuz.jar
${PUREQUERY_PATH}/pdq.jar
${PUREQUERY_PATH}/pdqmgmt.jar
Avoid trouble: When specifying the directory path for
${DB2_JCC_DRIVER_PATH},
${UNIVERSAL_JDBC_DRIVER_PATH}, and ${DB2_JCC_DRIVER_PATH} do
not specify a path that contains any special characters as identified
in section 2.4.3 of the
RFC 2396: Uniform Resource Identifiers
(URI): Generic Syntaxgotcha
Attention: ${PUREQUERY_PATH}/pdq.jar
and ${PUREQUERY_PATH}/pdqmgmt.jar are added to the class path as
a convenience and are only required if the JDBC provider is used by
pureQuery applications. If you are using this JDBC provider with
pureQuery applications, set the PUREQUERY_PATH variable to the directory
where IBM Optim pureQuery Runtime JAR files are stored.
- Uses the following native library path:
${DB2_JCC_DRIVER_NATIVEPATH}
If
driverType is set to 2, the DB2_JCC_DRIVER_NATIVEPATH variable
should be set to the directory in your DB2 client
installation which contains the native driver libraries. If driverType
is set to 4, the native path is not used.
- Requires the following DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper
- Requires a valid authentication alias.
- 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 the type
2 driver, set this value to 2. If you want to use 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.
- useTransactionRedirect Configure this property as a data
source custom property if your backend uses the Database Partitioning
Feature (DPF) and your partitioning key remains constant throughout
a transaction. Activating the property affects how the IBM Data Server Driver for JDBC and SQLJ directs
each connection request that begins a transaction with DB2. The JDBC driver is triggered to send those
connection requests to the DPF node that contains the target data
of the first directable statement in the transaction, if such a statement
exists. DB2 then directs the
SQL statement to different partitions as needed; the transaction proceeds
normally from the viewpoint of the application server.
You can use useTransactionRedirect for
both driverType 2 and driverType 4 data sources. To
configure the property, use either the wsadmin scripting tool or the
administrative console page, Java EE
resource provider or connection factory custom properties collection.
Assign the property the value of true.
- 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.
Avoid trouble: To use this provider,
you must have the DB2 Universal
JDBC Driver for DB2 installed
and configured for the application server for z/OS. Refer to the topic, Using the DB2 Universal JDBC Driver to access DB2 for z/OS.
gotcha
This provider:
- Supports the following data source:
com.ibm.db2.jcc.DB2ConnectionPoolDataSource
This
data source can support two-phase transactions (for the application
server on the z/OS platform
only). If you set the DB2 Universal
JDBC Driver for type 2 connectivity, the application server running
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.
- 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 variable DB2UNIVERSAL_JDBC_DRIVER_PATH.
- 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.
Note: The driver file db2jcc_license_cu.jar ships
with the application server in the
app_server_root/universalDriver/lib
directory. It is automatically set to the
UNIVERSAL_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 the 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.
- Uses the following class path:
${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar
${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar
${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cisuz.jar
${DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH}
Avoid trouble: When specifying the
directory path for
${DB2_JCC_DRIVER_PATH}, ${UNIVERSAL_JDBC_DRIVER_PATH},
and ${DB2_JCC_DRIVER_PATH} do not specify a path that contains
any special characters as identified in section 2.4.3 of the
RFC
2396: Uniform Resource Identifiers (URI): Generic Syntaxgotcha
- Requires the following DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper
- Requires a valid authentication alias if the driverType property
(see properties below) is set to 4. If the driverType property is
set to 2, you must specify a component-managed authentication alias
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.
- Requires the following properties:
- 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 the application server for z/OS.
Avoid trouble: To use this provider,
you must have the DB2 Universal
JDBC Driver for DB2 installed
and configured for the application server for z/OS, or you must have the z/OS Application Connectivity to DB2 for z/OS feature
installed and configured for the application server for z/OS. Refer to the topic, Using the DB2 Universal JDBC Driver to access DB2 for z/OS.
gotcha
This provider:
- Allows applications to use both JDBC and Structured Query Language
in Java (SQLJ) access to DB2 databases. SQLJ use with CMP
is also supported.
- Does not support the creation of Version 4.0 data sources.
- Supports the two phase data source:
com.ibm.db2.jcc.DB2XADataSource
- Requires the following 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.
The 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.
Note: The driver file db2jcc_license_cu.jar ships
with the application server in the
app_server_root/universalDriver/lib
directory. The
UNIVERSAL_JDBC_DRIVER_PATH variable
is set to this directory location by default. 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 not required by the DB2 Universal JDBC Driver in the application
server for z/OS if your server
only uses type 4 drivers. In this case, you can set the value of DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH
to null.
Best practice: If you have servers that run both
type 2 and type 4 drivers, or might have both types in the future,
you can set this value to a valid file path for the native files.
The variable will be used for the type 2 drivers, but the value for
DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH should not cause any adverse effects
for cases in which the native files are not required.
bprac
- Uses the following class path:
${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar
${UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar
${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cisuz.jar
${DB2UNIVERSAL_JDBC_DRIVER_NATIVEPATH}
Avoid trouble: When specifying the
directory path for
${DB2_JCC_DRIVER_PATH}, ${UNIVERSAL_JDBC_DRIVER_PATH},
and ${DB2_JCC_DRIVER_PATH} do not specify a path that contains
any special characters as identified in section 2.4.3 of the
RFC
2396: Uniform Resource Identifiers (URI): Generic Syntaxgotcha
- Requires the following DataStoreHelper class:
com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper
- Requires a valid authentication alias.
- Requires the following properties: