Clustering demonstration
Demo files
- Generating a cluster configuration with the newjc tool : newjc.htm
- Quick tour of the cluster management features in the jonasAdmin console : clusterManagement.htm
- SampleCluster2 example for demonstrating the load-balancing : sampleCluster2.htm
Further information about the cluster architecture and configuration
All the demonstrations are based on a common cluster architecture described in the following figure :
single machine : the cluster configuration is collocated on a single machine
master node : management node enabling to administrate the cluster from a centralized console
db node : HSQL database node embedded into a JOnAS
cd : cluster daemon, bootstrap of a JOnAS node for the remote control
apache/mod_jk : HTTP server with the plugin enabling the load balancing of the HTTP flow
node1-2 : JOnAS nodes of the web level
node3-4 : JOnAS nodes of the ejb level
myCluster : logical cluster gathering the 4 JOnAS nodes, described in domain.xml
sampleCluster2Domain : domain name of the configuration
java client : fat client
CMI : RMI protocol for the cluster mode ensuring the JNDI replication and the EJB clustering
HA : SFSB replication
HTTP session : HTTP session replication
The sampleCluster2 example provided with JOnAS is used for illustrating the load balancing both at the web level and the ejb level. For each request, the application prints the crossed node names. The application relies on the following components :

sessionServlet : main servlet starting a new session and entry point for sending a request across the cluster. The servlet gets information about the web container
releaseSessionServlet : servlet used for releasing a session
checkSessionServlet : servlet used for checking the validity of a session
myEjb1 : stateless EJB getting information about the ejb container
myStateful : stateful EJB used for storing the requests history
ClientSFSBFO : fat java client used for illustrating the SFSB high availability
ClientLBRemote : fat java client used for illustrating the load balancing of the SLSB at the business method level