Configuring the DB2 data source requires you to install
the DB2 database drivers, create a DB2 JDBC provider on WebSphere,
create the data source on WebSphere, and then configure the corresponding
connection pool. In addition, WebSphere connecting to DB2 requires
a custom property to avoid thread deadlock.
Note: These procedures apply to both DB2 9.1 and DB2
9.5.
Install the DB2 database driverIn the [appserver root] directory,
create a directory named db2libs.
Copy the db2jcc.jar files from one of these locations to
the [appserver root]\db2libs directory:
The
Java directory under your [dbserver root] directory, such
as [dbserver root]/ibm/Sqllib/java (Windows) or [dbserver root]/java
(Linux or UNIX)
(for DB9.5 only) [LiveCycle root]\lib\db\db2\
Create a DB2 JDBC providerIn
the WebSphere Administrative Console navigation tree, click Environment > Websphere Variables and,
in the right pane, click DB2UNIVERSAL_JDBC_DRIVER_PATH.
In the Value box, type the path to the db2libs directory.
Click OK or Apply and then click Save directly
to master configuration.
In the navigation tree, click Resources > JDBC > JDBC Providers.
In the Scope drop-down list in the right pane, select Node=NodeName, Server=ServerName as
the level, and then click New.
In the Step 1 pane, set the following configuration:
In the Database type list, select DB2.
In the Provider type list, select DB2 Universal JDBC Driver Provider.
In the Implementation type list, select Connection pool data source. Notice
that for each Configuration Manager configuration script, the field implementation
class name is com.ibm.db2.jcc.DB2ConnectionPoolDataSource.
In the Name box, either keep the default DB2 Universal JDBC Driver Provider or
type LiveCycle - DB2 - IDP_DS.
Click Next and, in the Step 2 pane, click Next again.
In the Step 3 pane, click Finish and then click Save directly
to master configuration.
Create the DB2 JDBC data source:
In the navigation tree, click Resources > JDBC > JDBC Providers and,
in the right pane, click the provider that you created in the Create a DB2 JDBC provider section.
Under Additional Properties, click Data sources and
then click New.
In the Enter basic data source information pane, set
the following configurations and then click Next:
In the Data source name box, type Livecycle - DB2 - IDP_DS.
In the JNDI name box, type IDP_DS.
In the Enter database specific properties for the datasource pane,
select the driver type, database name, server name, and port number
of the database that you created in 9.5.1 Configure J2C authentication for data source. Ensure that Use this data source in container managed persistence (CMP) is
selected, and then click Next.
In the Setup security aliases pane, set the following
configurations:
Click Finish in the Step 4 pane.
Click OK or Apply and then click Save directly
to master configuration.
Change the statement cache size. Do the following tasks:
In WebSphere Administrative Console, click JDBC > Data sources.
Click the data source you just created and under Additional Properties, click WebSphere Application Server data source properties.
Change the value of the Statement cache size field
to 80.
Click OK or Apply and the click Save directly
to the master configuration.
Select the data source you just created and select Test Connection to
ensure that the data source connection is functioning correctly.
Configure LiveCycle - DB2 - IDP_DS connection poolsIn the navigation tree, click Resources > JDBC > JDBC Providers and,
in the right pane, click the JDBC provider you just created (either DB2 Universal JDBC Driver Provider or LiveCycle - db2 - IDP_DS)
as used as an example when creating the DB2 JDBC provider.
Under Additional Properties, click Data sources and
then select Livecycle - DB2 - IDP_DS.
On the next screen, under Additional Properties, click Connection Pool Properties and
set the properties as follows:
In the Maximum connections box,
type 30 (or higher if required).
In the Minimum connections box, type 1.
Click OK or Apply and then click Save directly
to master configuration.
Configure the custom property for DB2In the
navigation tree, click Resources > JDBC > Data sources and,
in the right pane, click the data source that you created.
Under Additional Properties, click Custom properties and
then click New.
In the Name box, type useRRASetEquals and
in the Value box, type true.
Click OK or Apply and then click Save directly
to master configuration.
Create the DB2 JDBC data source for Rights ManagementNote: This section applies only if you have Rights Management
installed.
In the navigation tree, click Resources > JDBC > JDBC Providers and
then click the provider that you created in the Create a DB2 JDBC provider section.
Under Additional Properties, click Data sources and
then click New.
In the Enter basic data source information pane, set
the following configurations and then click Next:
In the Data source name box, type Livecycle - DB2 - RM_DS.
In the JNDI name box, type EDC_DS.
In the Enter database specific properties for the datasource pane,
type the driver type, database name, server name, and port number
of the database that you created in 9.5.1 Configure J2C authentication for data source.
Ensure that Use this data source in container managed persistence (CMP) is
selected, and then click Next.
Set the following configurations in the Setup security aliases pane:
Click Finish in the Step 4 pane.
Click OK or Apply and then click Save directly
to master configuration.
Change the statement cache size. Do the following tasks:
In WebSphere Administrative Console, click JDBC > Data sources.
Click the data source you just created and under Additional Properties, click WebSphere Application Server data source properties.
Change the value of the Statement cache size field
to 80.
Click OK or Apply and the click Save directly
to the master configuration.
Select the data source you just created and select Test Connection to
ensure that the data source connection is functioning correctly.
Configure LiveCycle- DB2 - RM_DS connection pools for Rights Management:Note: This section applies
only if you have Rights Management installed.
In
the navigation tree, click Resource > JDBC > JDBC Providers and,
in the right pane, click the JDBC provider you just created (either DB2 Universal JDBC Driver Provider or LiveCycle - db2 - RM_DS)
as used as an example when creating the DB2 JDBC provider..
Under Additional Properties, click Data sources and
then select Livecycle - DB2 - RM_DS.
On the next screen, under Additional Properties, click Connection Pool Properties and
set the properties as follows:
In the Maximum connections box,
type 20 (or higher if required).
In the Minimum connections box, type 1.
Click OK or Apply and then click Save directly
to master configuration.
Configure the custom property for DB2:In the
navigation tree, click Resources > JDBC > Data sources and,
in the right pane, click the data source that you created in the Create the DB2 JDBC data source for Rights Management section.
Under Additional Properties, click Custom properties and
then click New.
In the Name box, type useRRASetEquals and
in the Value box, type true.
Click OK or Apply and then click Save directly
to master configuration.
Set default isolation levelLog
in to WebSphere Integrated Solutions Console.
In the WebSphere Administrative Console navigation tree,
click Resources > JDBC > Data Sources.
From the drop-down list in the right pane, select Node=NodeName, Server=ServerName.
All data sources under the node are displayed.
Click LiveCycle - DB2 - IDP_DS with JNDI name IDP_DS.
Click Custom Properties.
Search for webSphereDefaultIsolationLevel property,
and click to open it for edit.
Set value as 2. The value 2 denotes Read Committed.
Click Apply and then click OK.
In the Messages box at the top of the page, click Save directly
to master configuration.
Restart WebSphere.
|
|
|