Static membership is configured in the axis2.xml file. You need to locate the "cluster" XML element in this file. Next find the "membershipScheme" parameter and set it to "wka". wka stands for Well-Known Address.
<parameter name="membershipScheme">wka</parameter>
You need to define the values of the "tcpListenHost" and "tcpListenPort" entries. The listen host is the name or IP address of this member. (i.e. the member on which this axis2.xml file resides)
<parameter name="tcpListenHost">host0</parameter>
<parameter name="tcpListenPort">4000</parameter>
After the declaring the cluster level parameters, you can define the list of static members as follows:
<members>
<member>
<hostname>host1</hostname>
<port>4000</port>
</member>
<member>
<hostname>host2</hostname>
<port>4001</port>
</member>
</members>
host0, host1 & host2 are the machine names. That is it. Restart the nodes after configuring them as described above.
When members in this list join or leave the group, each node will automatically detect it. This is done using a periodic TCP ping.

0 comments:
Post a Comment