[jboss-user] [JBoss Messaging] - Re: Configuring Destinations
apk2072
do-not-reply at jboss.com
Thu Feb 22 15:48:34 EST 2007
I found some sample in examples folder. Here is the piece of java code, which works good.
public static void deployQueue(String jndiName) throws Exception
{
System.out.println("Deploying the queue - " + jndiName);
MBeanServerConnection mBeanServer = lookupMBeanServerProxy();
ObjectName serverObjectName = new ObjectName("jboss.messaging:service=ServerPeer");
String queueName = jndiName.substring(jndiName.lastIndexOf('/') + 1);
mBeanServer.invoke(serverObjectName, "createQueue", new Object[] {
queueName, jndiName }, new String[] { "java.lang.String","java.lang.String" });
System.out.println("Queue " + jndiName + " deployed");
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020797#4020797
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020797
More information about the jboss-user
mailing list