TransportConnection.getInstance(brokerDetail).connect(_protocolHandler, brokerDetail);
// this blocks until the connection has been set up or when an error
// has prevented the connection being set up
//_protocolHandler.attainState(AMQState.CONNECTION_OPEN);
AMQState state = _protocolHandler.attainState(openOrClosedStates);
if (state == AMQState.CONNECTION_OPEN)
{
_failoverPolicy.attainedConnection();
// Again this should be changed to a suitable notify