Java Reference
In-Depth Information
The KeepAliveTimeout directive allows reusing the same connection within 60
seconds. The number of requests per connection is unlimited, since we are setting
MaxKeepAliveRequests to 0 . The ManagerBalancerName directive provides
the balancer name for your cluster (defaults to mycluster ).
Most important for us is the ServerAdvertise directive, which sets to On and uses
the advertise mechanism to tell the JBoss AS to whom it should send the cluster in-
formation.
Now, restart the Apache web server and the single application server nodes. If you
have correctly configured the mode cluster on the httpd side, you will see that each
JBoss AS node will start receiving UDP multicast messages from mod_cluster .
Clustering your web applications
Clustering web applications requires the least effort for the developer. As we have
just discussed, all you need to do to switch on clustering in a web application is to
add the following directive in the web.xml descriptor:
<web-app>
<distributable/>
</web-app>
Once your application ships with the distributable stanza in it, the cluster will start,
and provided you have correctly designed your session layer, it will be load balanced
and fault tolerant.
Programming considerations to achieve HA
In order to support in-memory replication of HTTP session states, all servlets and
JSP session data must be serializable.
Note
Serialization is the conversion of an object to a series of bytes so that the object
can be easily saved to a persistent storage or streamed across a communication
Search WWH ::




Custom Search