Overview
The cluster setup is based on the Infinispan cluster configuration, via JGroups.
Steps:
- Build fcrepo-webapp.
- Copy fcrepo-webapp/target/fcrepo-webapp.war to a second location, we shall call this webapp2.
- Configure a different web port for the second jar.
- Configure another activeMQ port
- Under src/main/resource/config/activemq.xml
- Under transport, change the port to a nearby number.
In webapp1, execute:
export MAVEN_OPTS="-Djgroups.tcp.address=127.0.0.1 -Djgroups.tcp.port=7800 -Djgroups.tcpping.initial_hosts=127.0.0.1[7800],127.0.0.1[7801] -Djava.net.preferIPv4Stack=true"
mvn -Djetty.port=8888 jetty:run
In webapp2, execute:
export MAVEN_OPTS="-Djgroups.tcp.address=127.0.0.1 -Djgroups.tcp.port=7801 -Djgroups.tcpping.initial_hosts=127.0.0.1[7800],127.0.0.1[7801] -Djava.net.preferIPv4Stack=true"
mvn -Djetty.port=8889 jetty:run
- Look for the message "Received new cluster view"
export MAVEN_OPTS="-Dfcrepo.ispn.jgroups.configuration=jgroups-udp.xml -Djava.net.preferIPv4Stack=true"
mvn -Djetty.port=8888 clean jetty:run