32.3. Session Replication at the Web Level

This section shows you how to configure Apache, Tomcat, and JOnAS to run the following architecture:

Figure 32-3. Session Replication

The term session replication is used when the current service state is being replicated across multiple application instances. Session replication occurs when the information stored in an HttpSession is replicated from, in this example, one Servlet engine instance to another. This could be data such as items contained in a shopping cart or information being entered on an insurance application. Anything being stored in the session must be replicated for the service to failover without a disruption.

The solution chosen for achieving Session replication is called in-memory session-replication. It uses a group communication protocol written entirely in Java, called JavaGroups. JavaGroups is a communication protocol based on the concept of virtual synchrony and probabilistic broadcasting.

The following describes the steps for achieving Session replication with JOnAS.

32.3.1. Running your Web Application

The web application is now ready to run in the cluster:

  1. Start the JOnAS servers:

    service jonas start
  2. Restart Apache: /usr/local/apache2/bin/apachectl restart

  3. Use a browser to access the welcome page, usually index.html