Tuesday, January 19, 2010

Setting up SMX4 failover with Oracle

In the tradition of posting articles regarding Servicemix 4 failover here is yet another blog entry. The functionality described below is currently available as a patch to Karaf, a future release should include this feature.

The following system.properties configuration will allow your Karaf based SMX4 instance to use an Oracle JDBC lock:

karaf.lock=true
karaf.lock.class=org.apache.
felix.karaf.main.OracleJDBCLock
karaf.lock.jdbc.url=jdbc:
oracle:thin:@hostname:1521:XE
karaf.lock.jdbc.driver=oracle.
jdbc.OracleDriver
karaf.lock.jdbc.user=user
karaf.lock.jdbc.password=
password
karaf.lock.jdbc.table=KARAF_
LOCK
karaf.lock.jdbc.clustername=
karaf
karaf.lock.jdbc.timeout=30

Please note that the Oracle JDBC driver will have to be added to your classpath, this can be easily done by coping the Oracle JDBC jar into the SMX/lib folder. Also note that the karaf.lock.jdbc.url requires an active SID, this means you must manually create a database instance before using this particular lock.

No comments: