...
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>8.1.8</dep:version> <dep:type>jar</dep:type> </dep:dependency> <dep:dependency> <dep:groupId>com.ibm.db2</dep:groupId> <dep:artifactId>db2jcc_license_cisuz</dep:artifactId> <dep:version>8.1.8</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>8.1.8</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">db2admin</config-property-setting> <config-property-setting name="Driver">com.ibm.db2.jcc.DB2Driver</config-property-setting> <config-property-setting name="UserName">db2admin</config-property-setting> <config-property-setting name="ConnectionURL">jdbc:db2://localhost:50000/SAMPLE</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> |
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.3\tranql-connector-ra-1.3.rar
You should receive the following message:
No Format bgColor #000000 borderStyle solid
D:\geronimo-tomcat6-jee5-2.0\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.0
Using GERONIMO_HOME: D:\geronimo-tomcat6-jee5-2.0
Using GERONIMO_TMPDIR: D:\geronimo-tomcat6-jee5-2.0\var\temp
Using JRE_HOME: C:\Java\jdk1.5.0_06\\jre
Deployed console.dbpool/DB2_ds/1.0/rar