-
1. Re: How to delete a dynamically created queue?
jbmuser Aug 26, 2010 2:37 AM (in response to andreas_back)Delete Programatically
----------------------------------------
String jmxUrl = "service:jmx:rmi:///jndi/rmi://" + host + ":" + jmxPort + "/jmxrmi";
JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(jmxUrl), new HashMap());
MBeanServerConnection conn = connector.getMBeanServerConnection();ObjectName name=new ObjectName("org.hornetq:module=JMS,type=Server");
JMSServerControl control = (JMSServerControl)MBeanServerInvocationHandler.newProxyInstance(mbsc,name,JMSServerControl.class,false);
control.destroyQueue(queueName);
Delete Using JMX console
----------------------------------------
See attached.
-
JMX-Console.jpg 103.5 KB
-
-
2. Re: How to delete a dynamically created queue?
timfox Aug 26, 2010 5:28 AM (in response to jbmuser)1 of 1 people found this helpful+1
Also, third way - can delete by sending a management message on the normal connection (no JMX required)
-
3. Re: How to delete a dynamically created queue?
andreas_back Aug 26, 2010 8:38 AM (in response to timfox)Hello Bijith and Tim,
thank you for your response!
The application specific administration tool has been extended by the possibility to delete the dynamically created queues programmatically by using the JMX solution. This allowed it to restrict the naming pattern of the queues that can be deleted. It was a little bit tricky to find the correct JMX-URL-pattern, but it
https://jira.jboss.org/browse/JBAS-3885
had it also.
With best regards,
Andreas