Hi all
I'm deploying my app in JBoss 7.1.1, and trying to get some information status about my queues. I'm using the JMX api for this:
{code:java}JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(JMX_URL), null);
MBeanServerConnection mbsc = connector.getMBeanServerConnection();
...
ObjectName delivery = ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(deliveryQueue.getQueueName());
...
deliveryQueueControl = (JMSQueueControl)MBeanServerInvocationHandler.newProxyInstance(mbsc, delivery, JMSQueueControl.class, false);
...
messageCounterInfo = MessageCounterInfo.fromJSON(deliveryQueueControl.listMessageCounter());{code}
I get the correct (apparently) info from getDepth, getDepthDelta, but getLastAddTimestamp always returns '12/31/69 7:00:00 PM' and getCount and getCountDelta always returns zero. Can this behavior be caused be me ? or this is a bug ?
The message count is a dynamic value. Did you get a new messageCounterInfo every time you call fromJSON()? What's the result if you call directly deliveryQueueControl.getMessageCount()? is it always zero too?