Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »


We want the two public instaces to share the comments which are stored in the forum workspace. But otherwise we want to keep the content independent.



  • add a new repository configuration
    • point to a jackrabbit configuration file which has the Cluster element defined
    <!-- magnolia non-default repository -->
    <Repository name="magnoliacluster" provider="info.magnolia.jackrabbit.ProviderImpl" loadOnStartup="true">
        <param name="configFile" value="${magnolia.repositories.jackrabbit.cluster.config}" />
        <param name="repositoryHome" value="${magnolia.repositories.home}/magnoliacluster" />
        <!-- the default node types are loaded automatically
            <param name="customNodeTypes" value="WEB-INF/config/repo-conf/nodetypes/magnolia_nodetypes.xml" />
        <param name="contextFactoryClass" value="org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory" />
        <param name="providerURL" value="localhost" />
        <param name="bindName" value="cluster-${magnolia.webapp}" />
  • add a mapping to the clustered repository for the workspace
    • to tell the system that this workspace lives in a different repository (the clustered one)
              <Map name="website" repositoryName="magnolia" workspaceName="website" />
              <Map name="forum" repositoryName="magnoliacluster" workspaceName="forum" />
  • set magnolia.repositories.jackrabbit.cluster.config in the magnolia.poperties


jackrabbit configuration file


  • make a copy of the non-clustering configuration file
  • make sure that both the instances use the same underlaying database
  • add the cluster configuration to the configuration file
      <Cluster syncDelay="2000">
        <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
          <param name="revision" value="${rep.home}/revision"/> 
          <param name="driver" value="com.mysql.jdbc.Driver"/> 
          <param name="url" value="jdbc:mysql://localhost:3306/magnolia"/> 
          <param name="user" value="magnolia"/> 
          <param name="password" value="magnolia"/> 
          <param name="schema" value="mysql"/> 
          <param name="schemaObjectPrefix" value="JOURNAL_"/> 

Set the cluster id

The cluster id identifies the instance and is used to write changes to the journal as well as to load changes from the journal. Make sure this is a unique value and is not shared with the other nodes in the cluster.

  • set magnolia.clusterid property in the file



Make sure that the content is not activated to both the clustered instances.

  • only one subscriber should have a subscription to the clustered workspace(s) in /server/activaiton/subscribers/xxx/subscriptions


  • once a workspace has been created a copy of jackrabbit configuration is saved to the workspace folder (workspace.xml)
    • changing the original jackrabbit configuration file won't have any effect
    • changes have to be made in the workspace.xml
  • No labels