6.1.2.1.15. How to configure jcr for cluster ?

So we have configured JCR in standalone mode and want to reconfigure it for clustered environment. First of all, let's check whether all requirements are satisfied:

So now, need to configure Container a bit. Check exo-configuration.xml to be sure that you are using JBossTS Transaction Service and JBossCache Transaction Manager, as shown below.


<component>
   <key>org.jboss.cache.transaction.TransactionManagerLookup</key>
   <type>org.jboss.cache.GenericTransactionManagerLookup</type>
</component>

<component>
   <key>org.exoplatform.services.transaction.TransactionService</key>
   <type>org.exoplatform.services.transaction.jbosscache.JBossTransactionsService</type>
   <init-params>
      <value-param>
         <name>timeout</name>
         <value>300</value>
      </value-param>
   </init-params>
</component>

Next stage is actually the JCR configuration. We need JBossCache configuration templates for : data-cache, indexer-cache and lock-manager-cache. Later they will be used to configure JCR's core components. There are pre-bundled templates in EAR or JAR in conf/standalone/cluster. They can be used as is or re-written if needed. And now, re-configure a bit each workspace. Actually, a few parameters need changing, e.g. <cache>, <query-handler> and <lock-manager>.

Those properties have the same meaning and restrictions as in the previous block. The last property "max-volatile-time" is not mandatory but recommended. This notifies that the latest changes in index will be visible for each cluster node not later than in 60s.

That's all. JCR is ready for running in a cluster.

Copyright ©2012. All rights reserved. eXo Platform SAS