Configuring a JDBC provider and datasource for virtual member manager

Use these steps to configure the type4 JDBC provider for DB2 as well as various database types.

About this task

In the initial offering of IBM Websphere Application Server Version 6.1, only the IBM DB2 legacy CLI-based type2 Java database connectivity (JDBC) driver was supported for DB2. In Websphere Application Server V7.0 support is provided for the DB2 JCC type4 JDBC driver.
Note: In a WebSphere Application Server Network Deployment configuration, perform the changes on the deployment manager and restart all the managed nodes.

Procedure

  1. Add the following libraries to the class path for the server Java virtual machine (JVM).
    Note: You can either copy the JDBC driver files to the WebSphere Application Server lib directory or include the location of the JDBC driver files in the server JVM class path.
    Table 1. Libraries for the Java virtual machine
    Library type File name
    DB2
    • ${DB2_JDBC_DRIVER_PATH}/ db2jcc.jar
    • ${DB2_JDBC_DRIVER_PATH}/ db2jcc_license_cu.jar
    • ${DB2_JDBC_DRIVER_PATH}/ db2jcc_license_cisuz.jar
    Derby ${WAS_APP_SERVER_ROOT}/ derby/lib/derby.jar
    Infomix Dynamic Server
    • ifxjdbc.jar
    • ifxjdbcx.jar
    Oracle Enterprise Edition ojdbc14.jar
    SQL Server Enterprise
    • sqlserver.jar
    • base.jar
    • util.jar
  2. Configure a JDBC provider using the information in the topic Configuring a JDBC provider using the administrative console and the information in the following table. The providers in the following table have an XA data source implementation type.
    Table 2. JDBC providers
    Type JDBC provider
    DB2 DB2 Universal JDBC Driver Provider
    Derby Derby JDBC Provider
    Infomix Dynamic Server Informix JDBC Provider
    Oracle Enterprise Edition Oracle JDBC Provider
    SQL Server Enterprise IBM WebSphere embedded ConnectJDBC Provider for MS SQL Server
    Note: Either copy the JDBC driver files to the WebSphere Application Server lib directory or include the location of the JDBC driver files in the server JVM class path.
  3. Create a data source using the JDBC provider information in the previous table and the information in the topic Configuring a data source using the administrative console.
  4. Set the following custom property on the newly created data source: webSphereDefaultIsolationLevel = 2 For more information, see the topic Changing the default isolation level for non-CMP applications and describing how to do so using a new custom property webSphereDefaultIsolationLevel.
  5. Restart the application server.
  6. Complete one of the following steps:
    1. If you do not have any existing database repositories, then use the driver suitable to your DB type to configure new database repositories. For details on how to create tables for a database repository, see the topic Setting up an entry mapping repository, a property extension repository, or a custom registry database repository using wsadmin commands.
      The following commands are used to configure database repositories. For details on how to use these commands, see the topicIdMgrRepositoryConfig command group for the AdminTask object.
      Table 3. Commands for configuring repositories
      Action type Command
      Database repositories createIdMgrDBRepository
      Property extension repository setIdMgrPropertyExtensionRepository
      Entry mapping repository setIdMgrEntryMappingRepository
    2. If you already have existing database repositories based on the DB2 legacy CLI-based type2 driver, then update the repositories to use the type4 driver as follows:
      Table 4. Updates for existing repositories
      Action type Command
      Database repositories wsadmin> $AdminTask updateIdMgrDBRepository {-id database_ID -dbURL database_URL -JDBCDriverClass com.ibm.db2.jcc.DB2Driver}
      Property extension repository wsadmin> $AdminTask setIdMgrPropertyExtensionRepository {-dbURL database_URL -JDBCDriverClass com.ibm.db2.jcc.DB2Driver -databaseType database_typ -dataSourceName data_source_nam -dbAdminId database_administrator_ID -dbAdminPassword database_administrator_password}
      Entry mapping repository wsadmin> $AdminTask setIdMgrEntryMappingRepository {-dbURL database_URL -JDBCDriverClass com.ibm.db2.jcc.DB2Driver -databaseType database_type -dataSourceName data_source_name -dbAdminId database_admin_ID -dbAdminPassword database_administrator_password}
  7. Restart the Application Server. Virtual member manager now uses the new driver.


Terms of use | Feedback

http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.wim.doc/definedb2jdbcdriver.html