Skip to content

Instantly share code, notes, and snippets.

@juliojsb
Created January 18, 2016 19:39
Show Gist options
  • Save juliojsb/1e80e8a1fbc9ed92f1a5 to your computer and use it in GitHub Desktop.
Save juliojsb/1e80e8a1fbc9ed92f1a5 to your computer and use it in GitHub Desktop.
Jboss AS 7.X/6.X EAP TCP Cluster example
In standalone-ha.xml:
<subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="tcp">
<stack name="udp">
...
</stack>
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp" diagnostics-socket-binding="jgroups-diagnostics"/>
<protocol type="TCPPING">
<property name="initial_hosts">192.168.2.101[7600],192.168.2.102[7600]</property>
<property name="num_initial_members">2</property>
<property name="port_range">0</property>
<property name="timeout">2000</property>
</protocol>
<protocol type="MERGE2"/>
<protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>
<protocol type="FD"/>
<protocol type="VERIFY_SUSPECT"/>
<protocol type="BARRIER"/>
<protocol type="pbcast.NAKACK"/>
<protocol type="UNICAST2"/>
<protocol type="pbcast.STABLE"/>
<protocol type="pbcast.GMS"/>
<protocol type="UFC"/>
<protocol type="MFC"/>
<protocol type="FRAG2"/>
</stack>
</subsystem>
Where:
Change default-stack to "tcp" in jgroups subsystem.
initial_hosts -> Hosts that are part of the cluster
num_initial_members -> Number of hosts for the cluster
port_range -> range of porst
timeout -> time in miliseconds to wait for a response from the other node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment