You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This article shows you how to configure a DB2 datasource in Apache Geronimo v2.0. Since the release of Geronimo v1.1 you can now select multiple drivers from the creation pool wizard on the Geronimo Administration Console.

In this scenario we are creating a connection pool for a DB2 database, in order to connect to that database we will need to define at least two driver jar files. That is the JDBC driver itself and the respective license files. Depending on your implementation you will need different license files.

The steps described in this article are valid for deploying any other datasource for which you don't have the drivers already installed on the server and/or may require multiple driver files.

This article provides two alternatives to deploy the connection pool, the first approach we tackle is using the Geronimo Administration Console, then we explain the process for using the command line option.

Add DB2 drivers to the repository

To add the DB2 drivers and license to the Geronimo repository you will need to place those files in a particular directory structure. You will normally have two or three files to add to the repository, these files are:

  • db2jcc.jar - This is the actual DB2 Universal JDBC Driver jar file.
  • db2jcc_license_cu.jar - This is the standard DB2 Universal JDBC driver license file that allows access to the DB2 Universal database for Linux, UNIX and Windows servers.
  • db2jcc_license_cisuz.jar - This is the DB2 (DB2 ESE and DB2 Connect) JDBC Driver license for z/OS and iSeries that should be used in addition to the standard license for these servers.

These files are available in the <sqllib_home>\java directory. For additional information on the DB2 JDBC drivers and licenses visit the DB2 Information Center available at the following URL:

http://publib.boulder.ibm.com/infocenter/db2luw/v8/topic/com.ibm.db2.udb.doc/ad/t0010264.htm

In order to use these files in Geronimo you will need to rename (copy and rename) as described in the following table.

Original name

Renamed

db2jcc.jar

db2jcc-8.1.8.jar

db2jcc_license_cu.jar

db2jcc_license_cu-8.1.8.jar

db2jcc_license_cisuz.jar

db2jcc_license_cisuz-8.1.8.jar

This means that for this particular case DB2 v8.1.8.806 was used.

At this point you are ready to add those files to the Geronimo repository, to do that you have two alternatives. You can either use any graphical or command line tool to copy the files and create the necessary directories or you use the Geronimo Administration Console and add the driver and licenses to the common libraries. Next we will cover both alternatives.

  • No labels