When configuring JGroups, a stack of protocols is specified. This stack of protocols is something similar to the OSI stack - a stack of protocols, one over another with the lowest layer doing the communication and the highest layer API being used by application programs. A example configuration for a JGroups protocols stack is
UDP(mcast_addr=224.10.10.10): PING(timeout=5000;num_initial_members=2): FD:STABLE:NAKACK:UNICAST:FRAG:FLUSH: GMS(join_timeout=5000;join_retry_timeout=100):VIEW_ENFORCER:STATE_TRANSFER:QUEUE
In order to avoid IP multicasting, a new server - called the Gossip server needs to be started. This server is used to maintain a registry of servers in the cluster. The individual messages that need to be sent among the nodes, is sent as multiple unicast messages among the nodes.
The UDP and PING protocol configurations have to be changed, such that the gossip server is used for cluster membership information, and multicasting is not used. This is done as follows:
UDP(ip_mcast=false;mcast_addr=224.10.10.10): PING(gossip_host=localhost;gossip_port=6666;gossip_refresh=150000;timeout=5000;num_initial_members=2): FD:STABLE:NAKACK:UNICAST: FRAG:FLUSH:GMS(join_timeout=5000;join_retry_timeout=100):VIEW_ENFORCER:STATE_TRANSFER:QUEUE
Note that in UDP, mcast is set to false and in PING, the gossip server details are provided.
The Gossip server is started as follows:
java org.jgroups.stack.GossipServer -port 6666
Why avoid multicasting? I'm new in JBOSS. I did Weblogic before...