if(ctx.getMethod().getName().equals("setUpFailover"))
{
return;
}
String failover = (String)System.getProperty ("JBossCluster-DoFail");
boolean doFail = false;
if (failover != null)
{
String strFailover = failover;
if (strFailover.equalsIgnoreCase ("true"))
{
doFail = true;
}
else if (strFailover.equalsIgnoreCase ("once"))
{
doFail = true;
System.setProperty ("JBossCluster-DoFail", "false");
}
}
if (doFail)
{
GenericClusteringException e = new GenericClusteringException
(GenericClusteringException.COMPLETED_NO, "Test failover from ejb interceptor", false);
log.debug ("WE FAILOVER IN EJB INTERCEPTOR (explicit failover)!", e);
throw e;
}