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

apk2072 do-not-reply at jboss.com
Mon Mar 26 16:30:24 EDT 2007


I also have the same requirement in creating the Queues programatically instead of maintaining the JBoss deploy folder.

I maintain my queue name in one of my configuration table, while starting up the server reads these queue names and deploys using following code.


MBeanServerConnection mBeanServer = lookupMBeanServerProxy();
		ObjectName serverObjectName = new ObjectName("jboss.messaging:service=ServerPeer");
		String queueName = jndiName.substring(jndiName.lastIndexOf('/') + 1);
		mBeanServer.invoke(serverObjectName, "deployQueue", new Object[] {
				queueName, jndiName }, new String[] { "java.lang.String","java.lang.String" });


REMEMBER, 1.2 HAS A SMALL BUG OVER 1.1. IT IS NO LONGER A "createQueue", IT IS "deployQueue".

-APK

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

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



More information about the jboss-user mailing list