Problem with Destination for a JMS temporary queue

Hello,

I want clients to create temporary queues, which they'll register into a database through a MDB. Then that MDB will take the names of the registered temp. queues and communicate with those clients through them.

Problem is with getting the Destination of a temporary queue having only its name. I am using SJAS and the temp. queue name looks like this:

temporary_destination://queue/192.168.15.100/2476/1.

When I try to get the Queue by session.createQueue(queueName) then I get javax.jms.InvalidDestinationException.

Since temporary queues don't have JNDI name associated with them - is there any way to get the Destination object? Or - how to register queue's name into JNDI?

Thanks in advance.

Michael

[763 byte] By [eMOa] at [2007-11-27 2:29:14]
# 1

I think that depends on the JMS implementation. With JBoss for instance, you can get a reference to the MBean Server running the JBoss kernel, and invoke a method on the queue manager MBean to create a queue with the name that you like. The queue will be bound in the JNDI context with the name you chose and from then you can retrieve it and work with it.

mtedonea at 2007-7-12 2:42:11 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...