Connection conn = null;
try
{
final LinkedQueue buffer = new LinkedQueue();
conn = createConnectionOnServer(theCF, 1);
conn.start();
conn.setExceptionListener(new ExceptionListener()
{
public void onException(JMSException e)
{
try
{
buffer.put(e);
}
catch (InterruptedException e1)
{
e1.printStackTrace();
}
}
});
waitForFailoverComplete(1, conn);
assertNull(buffer.peek());
waitForFailoverComplete(2, conn);
assertNull(buffer.peek());
waitForFailoverComplete(3, conn);
assertNull(buffer.peek());
ServerManagement.kill(0);
Exception e = (Exception) buffer.poll(120000);
System.out.println("e = " + e);
assertNotNull(e);
}
finally
{