We want the two public instances to share the comments which are stored in the forum workspace. But otherwise we want to keep the content independent.
see: Clustering in Magnolia documentation
add a new repository configuration in .../WEB-INF/config/default/repositories.xml
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)
- set magnolia.repositories.jackrabbit.cluster.config in the magnolia.properties to whatever you will use for the configuration file below (e.g. "WEB-INF/config/repo-conf/clustered-jackrabbit-bundle-mysql-search.xml")
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
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.
Cluster id can be defined either in the properties file (most convenient way) or in the persistence manager in the cluster configuration (both ways are used in the attached files):
Setting the cluster id in the properties file, will save you from having two different persistence manager files with just this little change.
- set magnolia.clusterid property in the magnolia.properties 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/activation/subscribers/xxx/subscriptions
Warning: loading of workspace configuration
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