SMX4 OSGi Deployment

Deploy Apache ODE OSGi bundle and example process (Ping Pong)

Enter smx4 console and run following commands:

features:addUrl mvn:org.apache.ode/ode-jbi-karaf/1.3.6/xml/features
features:install ode
features:install examples-ode-ping-pong

This will install ODE with default settings (OpenJPA DAO, embedded Derby database)

Configuring database

Create SMX4/etc/org.apache.ode.jbi.cfg file with following contents:

ode-jbi.pidNamespace=urn:ode-jbi
ode-jbi.allowIncompleteDeployment=false
ode-jbi.messageMapper=org.apache.ode.jbi.msgmap.ServiceMixMapper
ode-jbi.event.listeners=org.apache.ode.bpel.common.evt.DebugBpelEventListener

#For MySQL
#ode-jbi.db.int.mcf=org.tranql.connector.mysql.XAMCF
#ode-jbi.db.int.mcf.databaseName=ODE
#ode-jbi.db.int.mcf.userName=root
#ode-jbi.db.int.mcf.password=root
#ode-jbi.db.int.mcf.serverName=localhost

#For Postgres
#ode-jbi.db.int.mcf=org.tranql.connector.postgresql.PGXAMCF
#ode-jbi.db.int.mcf.databaseName=ODE
#ode-jbi.db.int.mcf.userName=postgres
#ode-jbi.db.int.mcf.password=postgres
#ode-jbi.db.int.mcf.serverName=localhost

#For SQLServer
#ode-jbi.db.int.mcf=org.tranql.connector.sqlserver.XAMCF
#ode-jbi.db.int.mcf.databaseName=ODE
#ode-jbi.db.int.mcf.userName=sa
#ode-jbi.db.int.mcf.password=sa
#ode-jbi.db.int.mcf.portNumber=1433
#ode-jbi.db.int.mcf.serverName=localhost

#For Oracle
ode-jbi.db.int.mcf=org.tranql.connector.oracle.LocalMCF
ode-jbi.db.int.mcf.databaseName=XE
ode-jbi.db.int.mcf.userName=ODE
ode-jbi.db.int.mcf.password=ode
ode-jbi.db.int.mcf.portNumber=1521
ode-jbi.db.int.mcf.serverName=localhost
ode-jbi.db.int.mcf.driverType=thin


# Uncomment the following to enable hibernate (this is recommended for production use):
#ode-jbi.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryImpl

Please note that EXTERNAL database is currently not available in ServiceMix4, because it requires JNDI, which SMX4 doesn't support.

After choosing a particular database, we need to start ODE with required dependencies. There are 2 example features prepared in ode-jbi-karaf features (ode-hib-oracle and ode-hib-sqlserver). So you need to run following command from Karaf console:

features:install ode-hib-oracle

Please note that etc/org.apache.ode.jbi.cfg must be set to the same database (in this case oracle) to load required dependencies properly.

Tips

How to make PMAPI work?

You can grab pmapi SA from here http://markmail.org/message/ghigpzcpt2j3qnoo. Then edit SMX4 etc/config.properties and change from:

org.osgi.framework.bootdelegation=sun.*,com.sun*,javax.transaction,javax.transaction.*

to:

org.osgi.framework.bootdelegation=sun.*,com.sun*,javax.transaction,javax.transaction.*,javax.xml.stream,javax.xml.stream.*