EAP6 provides web session replication out of the box when it's running in the domain mode (or in the standalone mode with the *-ha
profile enabled). The session replication is supported by the Infinispan subsystem, and the session container is defined in domain.xml
(and standalone-*-ha.xml
):
<cache-container name="web" aliases="standard-session-cache" default-cache="repl" module="org.jboss.as.clustering.web.infinispan"> ... </cache-container>
In this section, we'll use a sample project to demonstrate the usage of web session replication. The project is named as clusterbench
. It has been developed by my colleagues Radoslav Husar and Michal Babacek at Red Hat.
Note
The project is located at https://github.com/clusterbench/clusterbench.
This project has some excellent demonstration codes for us to use. So we'll directly deploy it into our EAP6 servers for testing.
In the demo project, there is a submodule called clusterbench-ee6-web
. In this module, we can see...