org.jboss.soa.esb.listeners.ha
Class FirstAvailable

java.lang.Object
  extended by org.jboss.soa.esb.listeners.ha.AbstractLoadBalancePolicy
      extended by org.jboss.soa.esb.listeners.ha.FirstAvailable
All Implemented Interfaces:
LoadBalancePolicy

public class FirstAvailable
extends AbstractLoadBalancePolicy

LoadBalancingPolicy implementation that always favor the first available target i.e. no load balancing occurs. Nevertheless, the first target is randomly selected. This does not mean that fail-over will not occur if the first epr in the list dies. In this case, fail-over will occur, and a new epr will become the first member and invocation will continously be invoked on the same new epr until its death. Code based on jbossas ha framework.

Author:
Kurt Stam.
See Also:
LoadBalancePolicy

Field Summary
protected  EPR electedEPR
           
 
Constructor Summary
FirstAvailable()
           
 
Method Summary
protected  EPR chooseEPRByPolicy(ServiceClusterInfo serviceCluster)
           
 
Methods inherited from class org.jboss.soa.esb.listeners.ha.AbstractLoadBalancePolicy
chooseEPR
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

electedEPR

protected transient EPR electedEPR
Constructor Detail

FirstAvailable

public FirstAvailable()
Method Detail

chooseEPRByPolicy

protected EPR chooseEPRByPolicy(ServiceClusterInfo serviceCluster)
Specified by:
chooseEPRByPolicy in class AbstractLoadBalancePolicy