users@glassfish.java.net

Dynamically create JMS topic

From: <glassfish_at_javadesktop.org>
Date: Tue, 08 Jan 2008 14:29:58 PST

I need to create jms topic dynamically in a ejb. On JBoss I would do the following:

[i]
List servers = MBeanServerFactory.findMBeanServer(null);
MBeanServer server = ( MBeanServer ) servers.iterator().next();
ObjectName objName = new ObjectName("jboss.mq:service=DestinationManager");
server.invoke(objName, "createTopic", new Object[]{"newTopic" + id}, new String[] "java.lang.String"});
[/i]

Is there an equivalent way of doing this on glassfish?

Thanks.
[Message sent by forum member 'luxitan' (luxitan)]

http://forums.java.net/jive/thread.jspa?messageID=252823