Object data = mi.getValue ("DO_FAIL_DURING_NEXT_CALL");
if (data != null &&
data instanceof java.lang.Boolean &&
data.equals (java.lang.Boolean.TRUE))
{
// Clear the instruction
mi.setValue ("DO_FAIL_DURING_NEXT_CALL", Boolean.FALSE, PayloadKey.AS_IS);
if (proxyFamilyName == null)
{
proxyFamilyName = getProxyFamilyName(mi);
}
// Clear the targets to simulate exhausting them all
FamilyClusterInfo info = ClusteringTargetsRepository.getFamilyClusterInfo(proxyFamilyName);
ArrayList targets = info.getTargets();
for (Iterator it = targets.iterator(); it.hasNext(); )
info.removeDeadTarget(it.next());
throw new ServiceUnavailableException("Service unavailable",
new Exception("Test"));
}
return getNext().invoke(mi);