...
In order to use these files in Geronimo, rename (copy and rename) the files according to the following table.In this case we will not use db2jcc_license_cisuz.jar because it's for Z/OS and iSeries.
Original name | Renamed |
---|---|
db2jcc.jar | db2jcc-9.5.jar |
db2jcc_license_cu.jar | db2jcc_license_cu-9.5.jar |
...
In Step 1, enter the pool name DB2_ds and database type DB2(DataDirect) in the database pool wizard and then click Next. See illustration in the following figure.
In Step 2, fill in the JDBC Driver Class: field with com.ibm.db2.jcc.DB2Driver
. And then select Driver JAR as following com/ibm/db2/db2jcc/9.5/jar
and com.ibm/db2/db2jcc_license_cu/9.5/jar
from the list by pressing Ctrl on the keyboard.Enter , then enter the remaining connection information as shown in the following figure. For this example the default db2admin user and password was used and a SAMPLE database was created via the DB2 Control Center, Server Name as localhost
.
Click Next.
Leave the options in Step 3 by default, you should see the message Driver Status: Loaded Successfully.
Click Test Connection, you will see a confirmation message that you are connected to DB2.
Click Deploy. You will have DB2_ds listed in the Database Pools portlet.
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?> <connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"> <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"> <dep:moduleId> <dep:groupId>console.dbpool</dep:groupId> <dep:artifactId>DB2_ds</dep:artifactId> <dep:version>1.0</dep:version> <dep:type>rar</dep:type> </dep:moduleId> <dep:dependencies> <dep:dependency> <dep:groupId>com.ibm.db2</dep:groupId> <dep:artifactId>db2jcc</dep:artifactId> <dep:version>9.5</dep:version> <dep:type>jar</dep:type> </dep:dependency> <dep:dependency> <dep:groupId>com.ibm.db2</dep:groupId> <dep:artifactId>db2jcc_license_cu</dep:artifactId> <dep:version>9.5</dep:version> <dep:type>jar</dep:type> </dep:dependency> </dep:dependencies> </dep:environment> <resourceadapter> <outbound-resourceadapter> <connection-definition> <connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface> <connectiondefinition-instance> <name>DB2_ds</name> <config-property-setting name="Password"TraceFile"/> <config-property-setting name="UserName">db2admin</config-property-setting> <config-property-setting name="Driver">com.ibm.db2.jcc.DB2Driver<DatabaseName">sample</config-property-setting> <config-property-setting name="UserNamePassword">db2admin</config-property-setting> <config-property-setting name="ConnectionURL">jdbc:db2://localhost:50000/SAMPLE<ServerName">localhost</config-property-setting> <connectionmanager> <local-transaction/> <single-pool> <max-size>10</max-size> <min-size>0</min-size> <match-one/> </single-pool> </connectionmanager> </connectiondefinition-instance> </connection-definition> </outbound-resourceadapter> </resourceadapter> </connector> |
...
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 jarslicense jar. 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.
...
No Format bgColor #000000 borderStyle solid
D:\geronimo-tomcat6-jee5-2.2\bin>deploy --user system --password manager deploy \tmp\db2-plan.xml ..\repository\org\tranql\tranql-connector-xa\1.4\tranql-connector-xa-1.4.rar
Using GERONIMO_BASE: D:\geronimo-tomcat6-jee5-2.2
Using GERONIMO_HOME: D:\geronimo-tomcat6-jee5-2.2
Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.2\var\temp
Using JRE_HOME: C:\Java\jdk1.56.0_06\\jre
Deployed console.dbpool/DB2_ds/1.0/rar
...