Example: Migrating - Installing a JDBC driver

The following examples demonstrate how to install a JDBC driver in WAS V4.0 and V6.x:

  • wscp V4.0

    In the WAS V4.0, create the JDBC driver and then install it

    JDBCDriver create /JDBCDriver:mydriver/ -attribute {{ImplClass COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource}}
    JDBCDriver install /JDBCDriver:mydriver/ -node /Node:mynode/ -jarFile c:/SQLLIB/java/db2java.zip
    

  • wsadmin V6.x

    In WAS V6.x, there is no separate installation step. The JAR file name in the V4.0 installation step is replaced by the classpath attribute on the V6.x JDBC provider object. In V6.x, resources can exist at the server, node, or cell level of the configuration.

    Jacl

    set node [$AdminConfig getid /Node:mynode/]
    $AdminConfig create JDBCProvider $node {{classpath c:/SQLLIB/java/db2java.zip} {implementationClassName COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource} {name mydriver}}
    $AdminConfig save
    

    Jython

    node = AdminConfig.getid('/Node:mynode/')
    AdminConfig.create('JDBCProvider', node, [['classpath', 'c:/SQLLIB/java/db2java.zip'],  ['implementationClassName', 'COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource'], ['name', 'mydriver']])
    AdminConfig.save()