-
1. Re: ClassCastException with JMSQueueControl
jbertram Apr 30, 2014 9:42 AM (in response to alansmanne)What version of JBoss AS are you using and what JVM version is running it?
-
2. Re: ClassCastException with JMSQueueControl
alansmanne Apr 30, 2014 9:45 AM (in response to jbertram)JBoss AS 7.1.1.Final "Brontes" on a Java 1.6 JDK (I'm using the embedded HornetQ module in /jboss/../modules/org/hornet)
-
3. Re: ClassCastException with JMSQueueControl
jbertram Apr 30, 2014 10:03 AM (in response to alansmanne)I think the name of the MBean would be different in AS 7.1.1. The name "jboss.as:subsystem=messaging,hornetq-server=default,jms-queue=testQueue" looks like the old style name from previous versions of JBoss AS. If you connect to the JVM where JBoss AS is running with JConsole and look at the MBeans do you see any related to HornetQ?
-
4. Re: ClassCastException with JMSQueueControl
alansmanne May 5, 2014 10:13 AM (in response to jbertram)With JConsole, I can see jboss.as:subsystem=messaging,hornetq-server=default,jms-queue=testQueue, so this seems right.
I've also tried
ObjectName queueObjectName = ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queue.getQueueName());
QueueControl queueControl = (QueueControl)MBeanServerInvocationHandler.newProxyInstance(server,queueObjectName,QueueControl.class,false);
And this returned
2014-05-05 16:06:39,815 ERROR [stderr] javax.management.InstanceNotFoundException: org.hornetq:module=JMS,type=Queue,name="testQueue"
I've tried to call the methods from JConsole. There is no error (so it only works remotely, not locally?), but the values are "wrong" (message counter is always 0, listMessages(AsJSON) is always empty, etc.)
-
5. Re: ClassCastException with JMSQueueControl
jbertram May 12, 2014 10:06 AM (in response to alansmanne)I'm not sure what the problem could be. Can you try on WildFly or provide a reproducible test-case?