-
1. Re: listAllMessages of a JMS queue
gonne Jan 3, 2012 8:12 AM (in response to mandarbk)Is the jmx management enabled in your hornetq configuration (standalone.xml) ?
CLI command to enable jmx management:
{code}
/subsystem=messaging/hornetq-server=default:write-attribute(name=jmx-management-enabled, value=true)
{code}
-
2. Re: listAllMessages of a JMS queue
mandarbk Jan 3, 2012 8:29 AM (in response to gonne)Even after enabling JMX , I still get the same exception.
<subsystem xmlns="urn:jboss:domain:messaging:1.1">
<hornetq-server>
<persistence-enabled>false</persistence-enabled>
<jmx-management-enabled>true</jmx-management-enabled>Exception :
javax.management.InstanceNotFoundException: org.hornetq:module=JMS,name="java:/queue/ProcessQ",type=Queue
-
3. Re: listAllMessages of a JMS queue
gonne Jan 3, 2012 8:52 AM (in response to mandarbk)Have you checked the ObjectName of the JMX bean in jconsole or jvisualvm?
I think your queue name is not correct, the ObjectName should be:
{code}
org.hornetq:module=JMS,name="ProcessQ",type=Queue
{code}
-
4. Re: listAllMessages of a JMS queue
snoop.one Mar 29, 2012 10:05 AM (in response to mandarbk)I have a similiar problem – and your solution is what I'm looking for.
But I keep getting
java.lang.ClassNotFoundException: org.hornetq.api.jms.management.JMSQueueControl
when deploying my ear. I have the following in my Manifest.mf file,
Manifest-Version: 1.0
Dependencies: org.infinispan org.hornetq export
Thanks in advance
-
5. Re: listAllMessages of a JMS queue
gonne Mar 29, 2012 10:36 AM (in response to snoop.one)If this is exactly your Manifest file you should separate the dependencies by a comma:
{code}
Manifest-Version: 1.0
Dependencies: org.infinispan, org.hornetq
{code}
Kind regards,
Gonne
-