This project has retired. For details please refer to its Attic page.
Apache ODE – WAR Deployment

WAR Deployment

Deploying the WAR

Unzip the distribution somewhere on your disk, everything needed is inside.

Get the WAR file in the distribution root directory, rename it to ode.war and copy this file to Tomcat's webapp directory. Start Tomcat and ODE should be up and running. You should get the Axis2 welcome page under http://localhost:8080/ode. The ODE WAR includes its own embedded database (Derby) so you don't have to worry about configuring any external database for now.

Examples

Copy the content of the examples directory in the distribution (the 3 sub-directories) to tomcat/webapps/ode/WEB-INF/processes, this will automatically deploy the 3 example processes. Use the sendsoap command located in the distribution bin directory to send test messages. The messages to run each of the 3 examples are provided in their respective directory (testRequest.soap). For each example type something like:

$ bin/sendsoap http://localhost:8080/ode/processes/helloWorld examples/HelloWorld2/testRequest.soap

The sendsoap executable can be found in the distribution bin directory. The urls should be updated according to the address defined in the WSDL file for the process service.

Configuring ODE in Tomcat with a MySQL database

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.

Bitronix TM, has a new home here on github. For any queries approach them on issues.

  1. Drop the MySQL JDBC driver (MySQL Connector/J) in the /lib directory of Tomcat 7.

  2. Download latest bitronix archive from here.

  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. Follow Step 2 in the original guide of bitronix.

  5. Configure data sources.

    Create a file name named resources.properties under conf/ directory of tomcat with the below contents.

    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=
    resource.ds2.driverProperties.password=
    resource.ds2.allowLocalTransactions=true
    resource.ds2.shareTransactionConnections=true
    

    Enter the appropriate mysql user and password in the properties file.

  6. 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.

    <Context reloadable="true" crossContext="true">    
       <Resource   
           name="jdbc/ode"   
           auth="Container" type="javax.sql.DataSource"   
           factory="bitronix.tm.resource.ResourceObjectFactory"   
           uniqueName="jdbc/ode" />  
    </Context>
    
  7. Add the below lines in the web.xml of ODE web application.

    <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>
    
  8. Remove jar file geronimo-jta_1.1_spec-1.1.jar from ODE web application /lib directory.

  9. Add the below lines to ode-axis2.properties

    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
    

    Note that the value for JNDI entry ode-axis2.db.ext.dataSource should match the entry resource.ds2.driverProperties.url.

  10. Make sure that MySQL is started and the ODE schema has been loaded in a ode database.

    $ mysql -u root
    mysql> create database ode;
    mysql> exit
    $ mysql -u root ode < ode-1.3.4-jpa-mysql55.sql
    

You're done!

Configuring ODE in JBoss with external JNDI datasource

Create ode/WEB-INF/conf/ode-axis2.properties with following content:

#Uncomment for using dao hibernate
#ode-axis2.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryImpl
ode-axis2.db.mode=EXTERNAL
ode-axis2.db.ext.dataSource=java:comp/env/jdbc/ode
ode-axis2.event.listeners=org.apache.ode.bpel.common.evt.DebugBpelEventListener
ode-axis2.tx.factory.class=org.apache.ode.axis2.util.JBossFactory