Java Reference
In-Depth Information
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/ 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 and ,
./ -c standalone-ha.xml -b
./ -c standalone-ha.xml -b
The -c parameter specifies the server configuration to be used; out of the box, the applica-
tion server includes two standalone clustering configurations: standalone-ha.xml
and standalone-full-ha.xml . The latter one also includes the messaging subsys-
tem and other elements of the Java EE full profile; therefore, it has been named the full
The other parameter ( -b ) should sound familiar to older JBoss users, as it's still used to
specify the server-binding address, which needs to be unique in order to avoid port con-
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:
./ -c standalone-ha.xml
./ -c standalone-ha.xml
As you can see, we had to specify two additional parameters: in or-
der to assign a unique server name to each node and a socket-binding port, which uses an
offset of 200 . So, for example, the second node would respond to the HTTP channel on
port 8280 instead of port 8080 .
Don't be surprised if you don't see any message about clustering on your server console.
Clustering modules are activated on demand, so first you need to deploy an application that
is cluster-aware. In a few minutes, we will show you how.
Search WWH ::

Custom Search