Configure a cluster for fail-over
https://access.redhat.com/kb/docs/DOC-53142 Issue We would like to migrate from self-contained jboss instances to a cluster. What we need most is a seamless redeployment or restarting of servers to change their deployments at runtime with no interruption visible to the user. JBOSS is running in clustered mode, and there are multiple nodes through which the application could be rendered depending on the load on the system. Will the session be replicated across these servers if I need to do a processing based on one variable ? Environment JBoss Enterprise Application Platform (EAP) 5.x 4.x Resolution For session replication/persistence to work do the following: Include the tag tag in the WEB-INF/web.xml If using a load balancing solution, be sure to have sticky sessions enabled too Base the node's config on the either the 'all' or 'production' config as these have clustering enabled by default N.B If your configuration is based on the 'default' profile, where session replication is not enabled by default, then you can follow steps 1 and 2 above and then the following Edit deploy/jboss-web.deployer/META-INF/jboss-service.xml and uncomment 'jboss.cache:service=TomcatClusteringCache' Copy deploy/jboss-web-cluster.sar/ from the production profile Copy lib/jgroups.jar from the production profile See the docs [1] and [2] on how to do this using Apache/mod_jk A sample application for testing session replication can be downloaded from [3] [1] http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3/html/Server_Configuration_Guide/clustering-h ttp-app.html [2] http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/5/html/Administration_And_Configuration_Guide/cl ustering-http-state.html#clustering-http-app [3] http://community.jboss.org/wiki/ReplicatedCounter