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.

Friday, October 30, 2009

Setting up SMX4 failover with MySQL

This post is an update to my previous post on setting up SMX4 with high availability in mind.

Since the transition to Apache Felix Karaf the support for more database locking table back ends has expanded. Specifically you can now use Apache Derby, MySQL, or a generic JDBC connector. The Derby and Generic JDBC locks make use of the 'FOR UPDATE' feature common to many databases. The MySQL lock however makes use of the ' LOCK TABLES' directive, this is due to the 'FOR UPDATE' command not returning a ResultSet on more recent versions of MySQL (see some discussions on this here).

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

karaf.lock=true
karaf.lock.level=20
karaf.lock.delay=1000
karaf.lock.class=org.apache.felix.karaf.main.MySQLJDBCLock
karaf.lock.jdbc.url=jdbc:mysql://address:port/dbname
karaf.lock.jdbc.driver=com.mysql.jdbc.Driver
karaf.lock.jdbc.user=root
karaf.lock.jdbc.password=karaf
karaf.lock.jdbc.table=KARAF_LOCK
karaf.lock.jdbc.clustername=mycluster
karaf.lock.jdbc.timeout=30


Please note that the MySQL JDBC driver will have to be made available on the classpath.

Wednesday, July 1, 2009

XHarness 1.0-beta-4 Released

XHarness version 1.0-beta-4 has just been released. It includes a couple of bug fixes and enhancements that have accumulated over the last few months, most notably the long overdue support for Ant 1.7.

Please see the Changelog on the XHarness website http://xharness.codehaus.org for more details.

You can download XHarness 1.0-beta-4 from the download page, alternatively if your using maven just update your poms.