Navnath Kumbhar [
http://community.jboss.org/people/navnath] created the discussion
"Re: How to Create JMS queue at run time using own java class?"
To view the discussion, visit:
http://community.jboss.org/message/612041#612041
--------------------------------------------------------------
Got it............
Very very simple code to create JMS Queue at run time.....
try {
String QName = "queueName";
String createType = "createQueue";
MBeanServer server = (MBeanServer)
javax.management.MBeanServerFactory.findMBeanServer(
null).iterator().next();
ObjectName ObjQueue = new
ObjectName("jboss.mq:service=DestinationManager");
// Passing Listener as String
server.invoke(ObjQueue, createType, new Object[] { QName },
new String[] { "java.lang.String" });
}catch(Throwable t) {
t.printStackTrace();
}
And you can see Queue is generated with name "queueName" and Listener for thia
queue is String which you can use wahtever you want.
This code creates Queue under DestinationManager
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/612041#612041]
Start a new discussion in JBoss Messaging at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]