2.7. Clustering JBoss BRMS with Jackrabbit

JBoss Enterprise BRMS can be configured to run in a JBoss Enterprise Application Platform cluster, providing high availability and failover, with each JBoss BRMS node in the cluster accessing the repository via a load balancer proxy which distributes incoming requests between the cluster nodes.

Procedure 2.5.  Setting up Clustering with Jackrabbit

  1. Set up a JBoss Enterprise Application Platform cluster, refer to the JBoss Enterprise Application Platform 5 Clustering Guide which is located in the Administration and Configuration Guide.
  2. Set up a load balancer, refer to the JBoss Enterprise Application Platform 5 HTTP Connectors Load Balancing Guide.
  3. Deploy a copy of jboss-brms.war to each node of the application server cluster $JBOSS_HOME/server/nodeX/deploy/
  4. The Default configuration uses embedded databases that are not suitable or supported for production environments. Before deploying into a production environment this configuration must be changed to a supported database. Please refer to the other sections in this chapter for configuration instructions.
  5. Each node in the cluster must have an individual workspace, version, and search index configured in the repository.xml file. Generate the repository.xml for the required database by logging in to the JBoss Enterprise BRMS user interface and selecting AdministrationRepository Configuration.
  6. Copy the repository.xml file to the repository location specified in the jboss-brms.war/WEB-INF/components.xml in each node of the cluster.
  7. Each node in the cluster must have a unique ID, which is set in each node's copy of the repository.xml file. For instance:
    <Cluster id="01" syncDelay="2000">
       <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
          <param name="revision" value="${rep.home}/revision.log" />
          <param name="driver" value="javax.naming.InitialContext" />
       	<param name="url" value="brms-jdbc-ds" />
       	<param name="schema" value="mysql"/>
       </Journal>
    </Cluster>
    
  8. Add the <distributable/> element as a child element of the web-app element to the jboss-brms.war/WEB-INF/web.xml file.
  9. Verify the Cluster Nodes are working by logging into the JBoss Enterprise BRMS user interface. Examine the terminal output to confirm which node is handling the session. Shut down that node, after a short interval another node in the cluster should take over the session.
For further information about clustering with Jackrabbit, refer to http://wiki.apache.org/jackrabbit/Clustering