How to set up jBoss clustering
In order to set up a jBoss cluster, you just have to start (via run -c all) two instances (or more)
of jBoss onto two different machines. jBoss uses IP multicast to discover nodes on the network.
You can start two instances on the same machine with just one network card, you just have to make
sure that both are using different ports (It is as easy as CTRL-C CTRL-V the 'all' config and go
through the config files and change the ports).
You may also want to configure jBoss instances in the cluster using static IP addresses. To do so,
edit the file cluster-service.xml in the folder server/all/deploy.
Comment the following:
<!- <UDP mcast_addr="228.1.2.3"
mcast_port="45566"
ip_ttl="32"
ip_mcast="true"
mcast_send_buf_size="800000"
mcast_recv_buf_size="150000"
ucast_send_buf_size="800000"
ucast_recv_buf_size="150000"
loopback="false"/>
<PING timeout="2000" num_initial_members="3" up_thread="true" down_thread="true" />
-->
and replace by:
<TCP start_port="8899"/>
<TCPPING initial_hosts="IPADRESS1[8899],IPADDRESS2[8899]"
port_range="5"
timeout="3000"
num_initial_members="2"
up_thread="true"
down_thread="true" />