9.5.2 Configuring DB2 database connectivity

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 driver

  1. In the [appserver root] directory, create a directory named db2libs.

  2. 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 provider

  1. In the WebSphere Administrative Console navigation tree, click Environment > Websphere Variables and, in the right pane, click DB2UNIVERSAL_JDBC_DRIVER_PATH.

  2. In the Value box, type the path to the db2libs directory.

  3. Click OK or Apply and then click Save directly to master configuration.

  4. In the navigation tree, click Resources > JDBC > JDBC Providers.

  5. In the Scope drop-down list in the right pane, select Node=NodeName, Server=ServerName as the level, and then click New.

  6. 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.

  7. Click Next and, in the Step 2 pane, click Next again.

  8. In the Step 3 pane, click Finish and then click Save directly to master configuration.

Create the DB2 JDBC data source:

  1. 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.

  2. Under Additional Properties, click Data sources and then click New.

  3. 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.

  4. 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.

  5. In the Setup security aliases pane, set the following configurations:

  6. Click Finish in the Step 4 pane.

  7. Click OK or Apply and then click Save directly to master configuration.

  8. 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.

  9. 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 pools

  1. In 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.

  2. Under Additional Properties, click Data sources and then select Livecycle - DB2 - IDP_DS.

  3. 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.

  4. Click OK or Apply and then click Save directly to master configuration.

Configure the custom property for DB2

  1. In the navigation tree, click Resources > JDBC > Data sources and, in the right pane, click the data source that you created.

  2. Under Additional Properties, click Custom properties and then click New.

  3. In the Name box, type useRRASetEquals and in the Value box, type true.

  4. Click OK or Apply and then click Save directly to master configuration.

Create the DB2 JDBC data source for Rights Management

Note: This section applies only if you have Rights Management installed.
  1. 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.

  2. Under Additional Properties, click Data sources and then click New.

  3. 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.

  4. 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.

  5. Ensure that Use this data source in container managed persistence (CMP) is selected, and then click Next.

  6. Set the following configurations in the Setup security aliases pane:

  7. Click Finish in the Step 4 pane.

  8. Click OK or Apply and then click Save directly to master configuration.

  9. 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.

  10. 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.
  1. 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..

  2. Under Additional Properties, click Data sources and then select Livecycle - DB2 - RM_DS.

  3. 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.

  4. Click OK or Apply and then click Save directly to master configuration.

Configure the custom property for DB2:

  1. 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.

  2. Under Additional Properties, click Custom properties and then click New.

  3. In the Name box, type useRRASetEquals and in the Value box, type true.

  4. Click OK or Apply and then click Save directly to master configuration.

Set default isolation level

  1. Log in to WebSphere Integrated Solutions Console.

  2. In the WebSphere Administrative Console navigation tree, click Resources > JDBC > Data Sources.

  3. From the drop-down list in the right pane, select Node=NodeName, Server=ServerName. All data sources under the node are displayed.

  4. Click LiveCycle - DB2 - IDP_DS with JNDI name IDP_DS.

  5. Click Custom Properties.

  6. Search for webSphereDefaultIsolationLevel property, and click to open it for edit.

  7. Set value as 2. The value 2 denotes Read Committed.

  8. Click Apply and then click OK.

  9. In the Messages box at the top of the page, click Save directly to master configuration.

  10. Restart WebSphere.

// Ethnio survey code removed