activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bogdan_1 <biva...@monexgroup.com>
Subject custom jmx client and jconole
Date Thu, 30 Oct 2008 15:32:04 GMT

hi,
i have a problem with a custom jmx client. i am connecting to activemq
running under camel.
this is the business part of the client :

url = new
JMXServiceURL("service:jmx:rmi:///jndi/rmi://sandbox:1099/jmxrmi");
jmxc = JMXConnectorFactory.connect(url, null);
mbsc = jmxc.getMBeanServerConnection();

Set<ObjectName> beanNames = mbsc.queryNames(new ObjectName(
"org.apache.activemq:BrokerName=localhost,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.a"),
null);

MBeanAttributeInfo[] mBeanAttrInfo = mbsc
.getMBeanInfo(beanName).getAttributes();
MBeanOperationInfo[] mBeanOpInfo = mbsc.getMBeanInfo(beanName)
.getOperations();

for (int i = 0; i < mBeanAttrInfo.length; i++) {
MBeanAttributeInfo attInfo = mBeanAttrInfo[i];
echo("Attribute : " + attInfo.getName() + " Value : "
+mbsc.getAttribute(beanName, attInfo.getName()));

}

so, i make the connection, retrieve the attributes and display them.
the problem is that, for the same address
"service:jmx:rmi:///jndi/rmi://sandbox:1099/jmxrmi"
jconsole shows me attributes with a different value then my client. Not to
mention that
the operations don't return anything.

any ideas on why the value of the attributes will be different between
jconsole and my custom client ?

thanks 
-- 
View this message in context: http://www.nabble.com/custom-jmx-client-and-jconole-tp20249313p20249313.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message