Chapter 17: Clustering worker.bal1.sticky_session = 1 worker.bal1.balance_workers = machine1, machine2, machine3 worker.stat1.type = status You need to replace 192.168.23.2 with the IP address of your machine (or machines if you are using more than one). For a detailed explanation of the configuration directives, refer to Chapter 11 . Map Path to Load Balance Working Using JkMount Back in the http.conf file of the Apache server, you need to map the path /examples/jsp/*to the mod_jkload balance worker that you have defined in the workers.propertiesfile. JkMount /examples/jsp/* bal1 JkMount /jkstatus/ stat1 You also need to make sure an entry exists to tell the Apache server where the workers.propertiesfile is located. JkWorkersFile conf/workers.properties Preparation for Using Different Session-Sharing Backends This completes the basic common setup for the upcoming cluster examples. Each of the session-sharing backends that will be configured requires very specific configuration and customization, and each is covered individually. More specifically, the following example shows how to configure the following backends: . In-memory replication . The Persistent Session Manager, using a shared-file system . The Persistent Session Manager, using JDBC-to-MySQL RDBMSs The following section covers the configuration of the in-memory replication mechanism. Backend 1: In-Memory Replication Configuration Two components need to be configured to enable in-memory configuration with Tomcat 6. Figure 17-9 depicts the position and function of the two components. In Figure 17-9 , a new component is responsible for the actual session replication. This includes the sending of new session information to the group, incorporating new incoming session information locally, and management of group membership. Under the hood, it uses the Apache Tribe group communications framework to get the job done. Another component, a replication Valve, is used to reduce the potential session replication traffic by ruling out (filtering) certain requests from session replication. Operation of the Tomcat 6 SimpleTcpCluster The default implementation of in-memory replication for Tomcat 6 is called SimpleTcpCluster. It is the only one available as of this writing. Development for clustering and the underlying Apache Tribes groups communications framework is an ongoing development activity.
For high quality jboss hosting services please check jboss web hosting website.