When you create a connection using the ActiveMQConnectionFactory, cast it to an ActiveMQConnection:

ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(brokerUrl);
ActiveMQConnection conn = (ActiveMQConnection) factory.createConnection();

And let your TransportListener implementation have a reference to conn.

In your TransportListener implementation, on transportResumed(), use

conn.getBrokerName()
conn.getBrokerInfo().getBrokerURL()
conn.getBrokerInfo().isSlaveBroker()

(haven't tried this myself, but it hopefylly works)

Reply via email to