I have the following lines in the jbossmq-destinations-service.xml
<mbean code="org.jboss.mq.server.jmx.Queue" name="jboss.mq.destination:service=Queue,name=EMS1"> <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends> <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends> <attribute name="SecurityConf"> <security> <role name="mtosiclients" read="true" write="true"/> </security> </attribute> </mbean>
ObjectName objName = new ObjectName("jboss.mq:service=DestinationManager"); MBeanServer server = MBeanServerLocator.locateJBoss(); DestinationManagerMBean mbean = (DestinationManagerMBean)MBeanServerInvocationHandler.newProxyInstance(server, objName, DestinationManagerMBean.class, false); mbean.createQueue("EMS1", "queue/EMS1");