// Monitor the connection for an exception being thrown
// this should be a DisconnectionException but it is not this tests
// job to valiate that. Only use the exception as a synchronisation
// to check the log file for the Close message
final CountDownLatch exceptionReceived = new CountDownLatch(1);
connection.setExceptionListener(new ExceptionListener()
{
public void onException(JMSException e)
{
//Failover being attempted.
exceptionReceived.countDown();