users@glassfish.java.net

Re: Creating / Registering JMS queues dynamically

From: Sivakumar Thyagarajan <Sivakumar.Thyagarajan_at_Sun.COM>
Date: Mon, 11 Jun 2007 17:00:39 +0530

Hi

Responses inline.

glassfish_at_javadesktop.org wrote:
> Hey,
>
> I have to create JMS queues dynamically by java code,
>
> So two questions goes here:
>
>
> 1) Is it possible to create/delete/update queue details via Java Code?

Do you want to create new physical destinations in the broker dynamically?
If yes, you could refer to the JMX API for the broker at
http://docs.sun.com/app/docs/doc/819-3882
and use the JMX APIs to create the destinations.

> 2) Inside a container, I usually declare a MessageDrivenBean and use the
> @MessageDriven(mappedName="QueueName") annotation,
>
> If the queue names are created dynamically, I cannot use the name statically within the annotation,
>
> So what is the right way to create a messageDrivenBean inside a container with a dynamic
> queue name?

AFAIK, there is no mechanism to do this dynamically. Ken, please correct me
if I have missed something.

Thanks
--Siva.

>
>
> Thanks.
> [Message sent by forum member 'trouby' (trouby)]
>
> http://forums.java.net/jive/thread.jspa?messageID=221444
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>