hornetq/hornetq — pull request #457 by fharms (2012-09-06 11:01:13+00:00)
Title: [HORNETQ-1023] The JBoss Messaging had support for listen for failover events simple by register a listener

TopicConnection connection = ((TopicConnectionFactory) lookup).createTopicConnection(username, password);
((JBossConnection) connection).registerFailoverListener(this);

This seems to be missing in the latest version of HornetQ, I have added support for adding a failover event listener to
a client connection and testcases and a example on how to use the new listener. The listener is triggered when a failover is detected, completed or fails.

```Connection connectionA = connectionFactory.createConnection();
((HornetQConnection)connectionA).setFailoverListener(new FailoverEventListener()
{
public void failoverEvent(FailoverEventType eventType) {
//
}
});```

Hope you can use it