activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AndrewB <a.bourgeois....@gmail.com>
Subject Re: Get list of connections through JMX?
Date Thu, 15 Sep 2011 15:41:44 GMT
Hello

That does indeed work for me:

ObjectName connectionNames = new
ObjectName("org.apache.activemq:BrokerName=localhost,Type=Connection,ConnectorName=openwire,Connection=*");
Set<ObjectName> names = mbsc.queryNames(connectionNames, null);
for(ObjectName name : names) {
       logger.error("Name: "+name.getCanonicalName());
}

Output:
2011-09-15 17:40:36,171 [main] ERROR - (root) - Name:
org.apache.activemq:BrokerName=localhost,Connection=toto,ConnectorName=openwire,Type=Connection
2011-09-15 17:40:36,171 [main] ERROR - (root) - Name:
org.apache.activemq:BrokerName=localhost,Connection=titi,ConnectorName=openwire,Type=Connection

Thank you very much!

Andrew

--
View this message in context: http://activemq.2283324.n4.nabble.com/Get-list-of-connections-through-JMX-tp3815517p3815975.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message