Java Reference
In-Depth Information
Before getting started with some cluster examples, we will first need to describe how
to set up a cluster of JBoss AS 7 nodes using the two available nodes: standalone
cluster and domain cluster .
Starting a cluster of standalone nodes
A standalone server starts as a single JVM process; therefore, we need to start each
server using the standalone.bat/standalone.cmd command, passing all the
required parameters. In the following example, we are starting a cluster of two server
nodes on two different boxes that are bound to the IP addresses 192.168.1.1 and
192.168.1.2 respectively:
./standalone.sh -c standalone-ha.xml -b
192.168.1.1
./standalone.sh -c standalone-ha.xml -b
192.168.1.2
The -c parameter specifies the server configuration to be used; out of the box, the
application server includes two standalone clustering configurations: standalone-
ha.xml and standalone-full-ha.xml . The latter one also includes the mes-
saging subsystem; therefore, it has been named the "full" configuration.
The other parameter ( -b ) should sound familiar to the older JBoss users, as it's still
used to specify the server-bind address, which needs to be unique in order to avoid
port conflicts.
In this other example, we are starting another cluster of two nodes on the same box
using some additional parameters in order to avoid port conflicts:
./standalone.sh -c standalone-ha.xml
-Djboss.node.name=node1
./standalone.sh -c standalone-ha.xml
-Djboss.node.name=node2
-Djboss.socket.binding.port-offset=200
As you can see, we had to specify two additional parameters: jboss.node.name ,
in order to assign a unique server name to each node, and a socket-binding port,
Search WWH ::




Custom Search