Title: WAR Deployment
Category: documentation
## Deploying the WAR
Unzip the [distribution](getting-ode.html) 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](http://tomcat.apache.org)'s webapp directory. Start Tomcat and ODE should be up and running. You should get the [Axis2](http://ws.apache.org/axis2) welcome page under [http://localhost:8080/ode](http://localhost:8080/ode). The ODE WAR includes its own embedded database ([Derby](http://db.apache.org/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](sendsoap-command.html) 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:
:::text
$ bin/sendsoap http://localhost:8080/ode/processes/helloWorld examples/HelloWorld2/testRequest.soap
The [sendsoap](sendsoap-command.html) 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](https://github.com/bitronix/btm). For any queries approach them on [issues](https://github.com/bitronix/btm/issues).
1. Drop the MySQL JDBC driver ([MySQL Connector/J](http://dev.mysql.com/downloads/#connector-j)) in the _/lib_ directory of Tomcat 7.
1. Download latest bitronix archive from [here](http://search.maven.org/#search|ga|1|org.codehaus.btm).
1. 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
1. Follow [Step 2](http://web.archive.org/web/20150520175205/https://docs.codehaus.org/display/BTM/Tomcat2x#Tomcat2x-Step2ConfigureBTMasthetransactionmanager) in the original guide of bitronix.
1. Configure data sources.
Create a file name named _**resources.properties**_ under conf/ directory of tomcat with the below contents.
:::properties
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.
1. 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
1. Add the below lines in the _**web.xml**_ of ODE web application.
:::xml
jdbc/ode
javax.sql.DataSource
Container
Shareable
1. Remove jar file _geronimo-jta_1.1_spec-1.1.jar_ from ODE web application _/lib_ directory.
1. Add the below lines to _**ode-axis2.properties**_
:::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_.
11. Make sure that MySQL is started and the [ODE schema](http://ode.apache.org/ode-schema.html) has been loaded in a _ode_ database.
:::text
$ 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:
:::properties
#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