6.7. Configuring Failover DeploymentsPage edited by Gert Vanthienen6.7. Configuring Failover DeploymentsThis chapter will demonstrate how to configure failover deployments. Simple lock fileThe simple lock file mechanism is intended for failover configurations where instances reside on the same host machine. To use this feature, edit the $KARAF_HOME/etc/system.properties file as follows on each system in the master/slave setup: karaf.lock=true karaf.lock.class=org.apache.servicemix.kernel.main.SimpleFileLock karaf.lock.dir=<PathToLockFileDirectory> karaf.lock.delay=10
karaf.lock=true karaf.lock.class=org.apache.felix.karaf.main.DefaultJDBCLock karaf.lock.level=50 karaf.lock.delay=10 karaf.lock.jdbc.url="" karaf.lock.jdbc.driver=org.apache.derby.jdbc.ClientDriver 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 Note:
JDBC locking on OracleIf you are using Oracle as your database in a JDBC locking scenario, the karaf.lock.class property in the $KARAF_HOME/etc/system.properties file must point to org.apache.felix.karaf.main.OracleJDBCLock. Otherwise, configure the system.properties file as normal for your setup, for example: karaf.lock=true karaf.lock.class=org.apache.felix.karaf.main.OracleJDBCLock karaf.lock.jdbc.url="" 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 As with the default JDBC locking setup, the Oracle JDBC driver JAR file must be in your classpath. You can ensure this by copying the ojdbc14.jar into Karaf's lib folder before starting Karaf. Note: The karaf.lock.jdbc.url requires an active SID, which means you must manually create a database instance before using this particular lock. Container-level lockingContainer-level locking allows bundles to be preloaded into the slave kernel instance in order to provide faster failover performance. Container-level locking is supported in both the simple file and JDBC locking mechanisms. To implement container-level locking, add the following to the $KARAF_HOME/etc/system.properties file on each system in the master/slave setup: karaf.lock=true karaf.lock.level=50 karaf.lock.delay=10 The karaf.log.level property tells the Karaf instance how far up the boot process to bring the OSGi container. Bundles assigned the same start level or lower will then also be started in that Karaf instance. Bundle start levels are specified in $KARAF_HOME/etc/startup.properties, in the format jar.name=level. The core system bundles have levels below 50, where as user bundles have levels greater than 50.
Note: When using a 'hot' spare on the same host you need to set the JMX remote port to a unique value to avoid bind conflicts. You can edit the Karaf start script to include the following: DEFAULT_JAVA_OPTS="-server $DEFAULT_JAVA_OPTS -Dcom.sun.management.jmxremote.port=1100 -Dcom.sun.management.jmxremote.authenticate=false"
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Felix > 6.7. Configuring Failover Deployments confluence
- [CONF] Apache Felix > 6.7. Configuring Failover Deploym... confluence
- [CONF] Apache Felix > 6.7. Configuring Failover Deploym... confluence
