Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

...

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.

Using command line

You will need to create the following directory structures under the <geronimo_home>\repository directory and copy the appropriate files to the respective directories.

...

  • com/ibm/db2/db2jcc_license_cu/8.1.8
    and copy the db2jcc_license_cisuz-8.1.8.jar into that directory.

Using the Geronimo Administration Console

In order to use the console Apache Geronimo must be running. Access the Geronimo Administration Console by pointing your browser to the following URL:

...

With the drivers and license files installed you can now create a new database connection pool.

Create a database connection pool using the wizard from the Geronimo Administration Console

From the Geronimo Administration Console select Database Pools and create a new pool by clicking on Using the Geronimo database pool wizard.

...

Click on Deploy. You should now have DB2_ds listed in the Database Pools portlet.

Deploy a database connection pool using the command line

As an alternatively to the wizard you could create a deployment plan manually and deploy it using the command line based deployer tool. To use this option create a db2-plan.xml file and copy the content of the following example.

...

Right after the moduleId comes the definition of the dependencies. In this particular case you can find three <dep:dependency> blocks pertaining to the DB2 JDBC driver and the two lincese jars. The last "big" block in this plan is the <resourceadapter> where the connection paramenters such as driver, user and password, connection URL, etc. are defined.

Deploy the datasource

To the deploy the DB2 datasource you just created run the following command from the <geronimo_home>\bin directory.

...

No Format
bgColor#000000
borderStylesolid
D:\geronimo-tomcat6-jee5-2.1\bin>deploy --user system --password manager deploy \tmp\db2-plan.xml ..\repository\org\tranql\tranql-connector-ra\1.3\tranql-connector-ra-1.3.rar
Using GERONIMO_BASE:   D:\geronimo-tomcat6-jee5-2.1
Using GERONIMO_HOME:   D:\geronimo-tomcat6-jee5-2.1
Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.1\var\temp
Using JRE_HOME:        C:\Java\jdk1.5.0_06\\jre
    Deployed console.dbpool/DB2_ds/1.0/rar

Back to Top