Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollbar}

Anchor
top
top

6.7. Configuring Failover Deployments

This chapter will demonstrate how to configure failover deployments.

Simple Lock File

The Simple Lock File mechanism is intended for failover configurations where instances reside on one host machine.

...

No Format
karaf.lock=true
karaf.lock.delay=10

Simple Lock File with container level locking.

The Container Level locking mechanism allows bundles to be loaded into the slave kernel instance in order to provide faster failover performance. The Container Level refers to the starting priority assigned to each bundle in the OSGI container. These 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.

...

No Format
DEFAULT_JAVA_OPTS="-server $DEFAULT_JAVA_OPTS -Dcom.sun.management.jmxremote.port=1100 -Dcom.sun.management.jmxremote.authenticate=false"

JDBC Locking

The JDBC locking mechanism is intended for failover configurations where instances exist on separate machines. In this deployment the master instance holds a lock on a servicemix locking table hosted on a database. If the master losses this lock then an awaiting slave process may gain access to the locking table, then fully start its container. The former master upon detection of lock loss will switch run levels as configured by lock level.

...

Level

Behavior

1

A 'cold' standby instance. Core bundles are not loaded into container. Slaves will wait until lock acquired to start server.

<50

A 'hot' standby instance. Core bundles are loaded into the container. Slaves will wait until lock acquired to start user level bundles. The console will be accessible for each slave instance at this level.

>50

This setting is Not recommended as user bundles will be started.

#top

Wiki Markup
{scrollbar}