Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

anchortoptop

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

...

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.htmImage Removed

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

...

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

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

...

  • 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:

http://localhost:8080/consoleImage Removed

  • Enter the system as the user and manager as the password and click Login.
  • Click on Common Libs to access the Repository viewer portlet.
  • Click on Browse and select the first file to install. In this case we will first install db2jcc-8.1.8.jar.
  • A set of values will be proposed by default, set the Group: to com.ibm.db2, leave the rest by default and click Install.
  • Repeate Repeat the previous two steps for db2jcc_license_cisuz-8.1.8.jar and db2jcc_license_cisuz-8.1.8.jar

...

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.

...

Let's analyze this plan now. Take a look at the <dep:environment> section, there you can find the moduleId which identify the resource or component being deployed; in the Administration Console the moduleId is displayed in the Component Name column on the Database Pools portlet.

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.

deploy --user system --password manager deploy <dep_plan_home>\db2-plan.xml ..\repository\org\tranql\tranql-connector-ra\1.23\tranql-connector-ra-1.23.rar

You should receive the following message:noformat

bgColor#000000borderStylesolid Esolid D:\geronimo-jetty-j2ee-1.12\bin>deploy --user system --password manager deploy \tmp\db2-plan.xml ..\repository\org\tranql\tranql-connector-ra\1.23\tranql-connector-ra-1.23.rar Using GERONIMO_BASE: ED:\geronimo-jetty-j2ee-1.1 2 Using GERONIMO_HOME: ED:\geronimo-jetty-j2ee-1.1 2 Using GERONIMO_TMPDIR: ED:\geronimo-jetty-j2ee-1.12\var\temp Using JRE_HOME: C:\Java\j2sdk1jdk1.45.2_09 Deployed 0_06\\jre Deployed console.dbpool/DB2_ds/1.0/rar

If you go back to the Database Pools portlet you should see the DB2_ds datasource listed in the portlet.

Image Removed

Back to Top