You can put together a heterogeneous cluster of Tomcat, Jetty and JBoss4 instances.
Firstly (if you are using a clustered configuration)
- download a copy of activemq-3.2.1-SNAPSHOT - unpack it somewhere
- set ACTIVEMQ_HOME to this dir and export it
- cd $ACTIVEMQ_HOME/bin
- start the activemq broker - e.g. 'sh ./activemq'
Then
Either:
- download a copy of WADI 2.0-SNAPSHOT - unpack it somewhere
- set WADI_HOME to this dir and export it
Or:
Then run up one red and one green instance of either Tomcat, Jetty or JBoss4.
Congratulations, you have started your first (2 node) WADI cluster ![]()
Look in $WADI_HOME/conf for the set of node.<colour>.properties files that define the red, green and many other nodes...
- point your browser at red - http://localhost:8080/wadi/jsp/create.jsp - this will create a session, passing back a unique key to the browser.
You should see a red page informing you of your session's creation on the red node.
- point your browser at green - http://localhost:8081/wadi/jsp/render.jsp - this will relocate the session from red to green and correctly render the page in the context of its session.
You should see a green page with a graphical representation of your session - a single red cell, representing the red node on which the session was created.
Congratulations, you have just survived a loss of session affinity ![]()
- shutdown (gently - i.e. ctl-c or some stop script) green, currently hosting your session, this should evacuate the session to the surviving node - red.
- point your browser at red - http://localhost:8080/wadi/jsp/render.jsp - the new location of your session
You should now see your session on a red page.
Congratulations, your session just remained active beyond the lifetime of its original host node ![]()
See Setting up a Load Balancer - mod_jk2 which demonstrates how to set up a load-balancer over your new cluster.
See Setting up JMX Monitoring - MC4J which describes how to monitor the number of sessions managed by WADI and anything else available via JMX.
