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>

I wish to remove this entry from the XML and create a queue dynamically... 


So I used the following code:

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");

The queue gets created, but when I try to connect to it, I get a no permission 
error. 

I wish to know whether this approach is correct and how to incorporate the 
Security conf which we specify in the XML, when we create the queue dynamically.

-----------------------------------
I am using jboss 4.0.5GA


Thanks in advance... for, at least you bothered to read my question :)
Jo

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093697#4093697

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093697
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to