Title: Using a JNDI datasource under ServiceMix JBI Category: documentation ## Overview These instructions will help you configure a JNDI DataSource for Apache ODE when running inside the ServiceMix JBI container. ## 1. Edit $SERVICEMIX/conf/jndi.xml Declare a managed connection factory pointing to your database: :::xml And register the DataSource in the JNDI registry by adding an `` under the `` element: :::xml ## 2. Edit ode-jbi.properties In ode-jbi.properties, set the following properties: :::properties ode-jbi.db.mode=EXTERNAL ode-jbi.db.ext.dataSource=java:comp/env/jdbc/ode (Be sure to match the JNDI lookup name to the one defined in $SERVICEMIX/conf/jndi.xml) ## 3. Add jencks-2.0-all library Copy [jencks-2.0-all.jar](http://repository.codehaus.org/org/jencks/jencks/2.0/jencks-2.0-all.jar) under $SERVICEMIX/lib ## 4. Restart ServiceMix And you're done! Don't forget to redeploy your service assemblies since they need to be re-synchronized with ODE. ## Extras ### Connection Pool Parameters If you want to manually configure the connection pool parameters, edit $SERVICEMIX/conf/tx.xml and update the "poolingSupport" object. For example, :::xml