Glassfish provides numerous pieces that encompass Java EE's reference implementation, in this entry you can explore one of its more advanced topics related to Clustering using the Shoal framework
Shoal is an open source, Java-based generic clustering framework. It can be used in your applications to add clustering functionalities like load balancing, fault tolerance, or both. Applications using Shoal can share data, communicate via messages with other cluster nodes across the network, and notify of relevant events like the joining, shutdown, and failure of a node or group of nodes. You can take appropriate measures and perform monitoring tasks when these events occur; Shoal forwards a signal to your code to track these notifications.
Shoal is the clustering framework used by the Glassfish project to implement its application server clustering. One of the benefits to your application is that Shoal abstracts away network details and the network communication API. Under the hood, the default group communication provider uses JXTA for peer-to-peer reliability and scalability.
Shoal is a lightweight component; you can embed Shoal not only in Java EE applications, but in SE applications too.
Read Clustering with the Shoal Framework:
http://today.java.net/pub/a/today/2007/12/11/clustering-with-shoal-framework.html