[jboss-user] [JBoss Messaging] - Re: Programmaticaly create queue

PoonamAgarwal do-not-reply at jboss.com
Thu Nov 20 07:09:51 EST 2008


I was able to create queues using deployQueue from the JMX Web console....but when I code it.....
I get InstanceNotFoundException (bean not registered) when I use the following code
mbeanServer = MBeanServerFactory.createMBeanServer();
ObjectName objName = new ObjectName("jboss.messaging:service=ServerPeer");
mbeanServer.invoke(objName, "deployQueue",
                new Object[] { "anyname", null },
                new String[] { "java.lang.String", "java.lang.String"} );

I am running the above code from a EJB Session bean in the same jboss server.
I have done all the steps to replace a Jboss MQ instance to a JBM 1.4 in jboss 4.2.0.
I have started the messaging server as I am able to perform this operation from jmx-web console...
Can somebody help?
-Poonam

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190849



More information about the jboss-user mailing list