On Tue, 25 Mar 2003 14:41, Stephen Davidson wrote:
> Christopher Blunck wrote:
> > Hi all-
> >
> > We're considering rolling out a fairly large application to JBoss.  The
> > only question in my head is:  can JBoss create a new JMS queue at
> > runtime?
> >
> > In other words, if I want to bring up a new JMS queue, do I need to
> > restart the server for the queue to come online?
> >
> > -c
>
> Hi Christopher.
>
> If you are using MDBs, the Q's are configured and started automatically
> when the MDBs are deployed.
>
> This leads me to suspect that Message Q's can be started at runtime w/o
> restarting the server.

They can indeed via the MBean interface for the queues/topics 
"jboss.mq:service=DestinationManager" like so...

ArrayList slist = (MBeanServer)MBeanServerFactory.findMBeanServer(null);
MBeanServer server = slist.get(0); // should check the size first
server.invoke(new ObjectName("jboss.mq","service","DestinationManager"),
              "createQueue", // mbean method to invoke
              new Object[]{"queuename"}, // Name of the queue
              new String[]{"java.lang.String"}); // type of the parameter

Now you have a new queue called queuename, lookup as "queue/queuename"

The mbean server access is portable (I think) but the method to invoke on the 
mbean "DestinationManagber" is probably not.



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to