Author: sathwik
Date: Mon Nov 17 07:05:46 2014
New Revision: 1640071
URL: http://svn.apache.org/r1640071
Log:
Draft integrating Bitonix TM with Tomcat and ODE
Modified:
ode/site/trunk/content/war-deployment.mdtext
Modified: ode/site/trunk/content/war-deployment.mdtext
URL:
http://svn.apache.org/viewvc/ode/site/trunk/content/war-deployment.mdtext?rev=1640071&r1=1640070&r2=1640071&view=diff
==============================================================================
--- ode/site/trunk/content/war-deployment.mdtext (original)
+++ ode/site/trunk/content/war-deployment.mdtext Mon Nov 17 07:05:46 2014
@@ -24,8 +24,66 @@ The [sendsoap](sendsoap-command.html) ex
The ODE war should have been copied to the _webapps_ directory of Tomcat and
the server should have been started at least once before following these
instructions. This ensures that the webapp is properly exploded.
-1. Drop the MySQL JDBC driver ([MySQL
Connector/J](http://dev.mysql.com/downloads/#connector-j)) in the _common/lib_
directory of Tomcat.
-1. Add the following stanza to _conf/server.xml_ inside the <Host> element:
+1. Drop the MySQL JDBC driver ([MySQL
Connector/J](http://dev.mysql.com/downloads/#connector-j)) in the _/lib_
directory of Tomcat 7.
+
+2. Download latest bitronix archive from
[here](http://docs.codehaus.org/display/BTM/Download).
+
+3. Copy these jars available in the bitronix archive to _/lib_ directory of
Tomcat 7.
+ * btm-2.1.4.jar
+ * btm-tomcat55-lifecycle-2.1.4.jar
+ * geronimo-jta_1.1_spec-1.1.1.jar
+ * slf4j-api-1.6.4.jar
+ * slf4j-jdk14-1.6.4.jar
+
+4. Configure data sources.
+ Create a file name named _**resources.properties**_ under conf/ directory
of tomcat with the below contents:
+
+ :::text
+ resource.ds2.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
+ resource.ds2.uniqueName=jdbc/ode
+ resource.ds2.minPoolSize=10
+ resource.ds2.maxPoolSize=50
+ resource.ds2.driverProperties.driverClassName=com.mysql.jdbc.Driver
+ resource.ds2.driverProperties.url=jdbc:mysql://localhost:3306/ode
+ resource.ds2.driverProperties.user=root
+ resource.ds2.driverProperties.password=mysql
+ resource.ds2.allowLocalTransactions=true
+ resource.ds2.shareTransactionConnections=true
+
+5. Associate the datasource created in the previous step for ODE
+Create a file named _**ode.xml**_ under conf/Catalina/localhost/ directory
under tomcat with the below given contents:
+
+ :::xml
+ <Context reloadable="true" crossContext="true">
+ <Resource
+ name="jdbc/ode"
+ auth="Container" type="javax.sql.DataSource"
+ factory="bitronix.tm.resource.ResourceObjectFactory"
+ uniqueName="jdbc/ode" />
+ </Context>
+
+6. Change the web.xml of ODE.
+Add these lines in the _**web.xml**_
+
+ :::xml
+ <resource-ref>
+ <res-ref-name>jdbc/ode</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+
+7. Remove duplicate jars.
+_geronimo-jta_1.1_spec-1.1.jar file from ODE web application _lib_ directory
+
+8. Add the below lines to _**ode-axis2.properties**_
+
+ :::text
+ ode-axis2.tx.factory.class=org.apache.ode.axis2.util.TomcatFactory
+ ode-axis2.db.mode=EXTERNAL
+ ode-axis2.db.ext.dataSource=java:comp/env/jdbc/ode
+
+2. Add the following stanza to _conf/server.xml_ inside the <Host> element:
:::xml
<Context path="/ode" docBase="ode" debug="5" reloadable="true"
crossContext="true">
@@ -35,7 +93,7 @@ The ODE war should have been copied to t
url="jdbc:mysql://localhost:3306/ode?autoReconnect=true"/>
</Context>
-1. Make sure that MySQL is started and the [ODE
schema](/resources/ode_openjpa_mysql-1.3.2.sql) has been loaded in a _ode_
database.
+3. Make sure that MySQL is started and the [ODE
schema](/resources/ode_openjpa_mysql-1.3.2.sql) has been loaded in a _ode_
database.
:::text
$ mysql -u root
@@ -43,7 +101,7 @@ The ODE war should have been copied to t
mysql> exit
$ mysql -u root ode < ode_openjpa_mysql-1.3.2.sql
-2. Add a file named _ode-axis2.properties_ under _webapps/ode/WEB-INF/conf_
with the following content:
+4. Add a file named _ode-axis2.properties_ under _webapps/ode/WEB-INF/conf_
with the following content:
:::properties
ode-axis2.db.mode=EXTERNAL