How can I force the IBM DB2 drivers to run as Type 4 when using Sun Java System Application Server/Glassfish?

The IBM drivers support both Type 2 (native) and Type 4 (pure Java). Type 4 is more convenient, since it runs on all platforms, although it may not be fully JDBC compliant. Which type is used is usually controlled by the URL that is used to connect.

However, Sun Java System Application Server runs the drivers in Type 2 by default. To force Type 4 to be used, it is necessary to add a property, driverType = 4, to the connection pool. To add this property:

  1. Open the Files window and expand the Setup node.
  2. Double-click the node db2Pool.sun-resource, and click on the value for Properties.
  3. Add a new Property with Property Name driverType and Property Value 4.

If the application has been deployed once, this operation can also be performed in the Admin Console for the Application Server as follows:

  1. In the admin console, select Resources > JDBC > Connection Pools > db2Pool
  2. Under Additional Properties, click Add Property, and add a new property with the name and value shown above.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo