if (delegate == null)
{
// the delegate corresponding to the actualServerID not found among the cached
// delegates. TODO Could this ever happen? Should we send back the cf, or update it
// instead of just the id??
throw new JMSException("Cannot find a cached connection factory delegate for " +
"node " + actualServerID);
}
}
}
catch (MessagingNetworkFailureException e)
{
delegate = null;
log.warn("Exception captured on createConnection... hopping to a new connection factory", e);
// Currently hardcoded
Thread.sleep(2000);
}
}
throw new JMSException("Maximum number of failover attempts exceeded. " +
"Cannot find a server to failover onto.");
}