The following examples demonstrate how to install a JDBC driver in WebSphere Application Server V4.0 and V6.x:
JDBCDriver create /JDBCDriver:mydriver/ -attribute {{ImplClass COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource}} JDBCDriver install /JDBCDriver:mydriver/ -node /Node:mynode/ -jarFile c:/SQLLIB/java/db2java.zip
In WebSphere Application Server V6.x, there is no separate installation step. The Java archive (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. Using 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 saveUsing 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()