closeAllSuckers();
//Note we use a timed callable since remoting has a habit of hanging on attempting to close
//We do not want this to hang the system - especially failover
Callable callable = new Callable() { public Object call()
{
try
{
connection.close();
}
catch (JMSException ignore)
{
}
return null;
} };
Callable timedCallable = new TimedCallable(callable, CLOSE_TIMEOUT);
try
{
timedCallable.call();
}
catch (Throwable t)
{
//Ignore - the server might have already closed - so this is ok
}