I found the solution anyway, I hope the same would be useful to other members as well:
Edit the file 'deploy-hasingleton-jboss-beans.xml'found in $Profile/deploy/cluster folder
Add the bean
<bean class="org.jboss.ha.singleton.PreferredMasterElectionPolicy" name="PreferredMasterElectionPolicy_1">
Note Here 0.0.0.0 is the IP address and 1299 is the jnp port.
replace with the appropriate IP and port
Also , add the property, <property name="electionPolicy"><inject bean="PreferredMasterElectionPolicy_1"/></property> to the bean HASingletonDeployer
For Example :
<!-- Have the BarrierController that listens for our JMX
notifications start first. -->
<property name="HAPartition"><inject bean="HAPartition"/></property>
<property name="target"><inject bean="HASingletonProfileManager"/></property>
<property name="electionPolicy"><inject bean="PreferredMasterElectionPolicy_1"/></property>
<!-- whether to register thread context classloader for the RPC handler, default is false -->
<!-- Whether the singleton should be restarted (i.e. invoke the TargetStopMethod and then the
TargetStartMethod) if a cluster merge occurs while this node is the singleton master.
A cluster merge means there may have been more than one singleton master during the period
when communication between some or all of the nodes in the cluster was disrupted; hence the
surviving master may not be aware of state changes made by another master. Restarting the
singleton gives it a signal that it should refresh its internal state from any external
By default this is set to true.
When i followed ur solution.
If the master is stopped, then the war files in other nodes are getting undeployed.
Example: Say A and B are 2 nodes. A is made master node with configurations you have told.
So i can access through browser. But if i stop A , then B should serve the request. But as i see the war file present under all/deploy-hasingleton
is getting undeployed when i stop A.(I cannot see war file there).
And so the request is not serviced.
What might be the problem and how to solve this.