[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Temporary queue not conform to JMS spec
gaohoward
do-not-reply at jboss.com
Thu Apr 2 10:13:55 EDT 2009
JMS 1.1 spec Section 4.4.3 2nd paragraph:
anonymous wrote : Temporary destinations (TemporaryQueue or TemporaryTopic objects) are
| destinations that are system-generated uniquely for their connection. Only
| their own connection is allowed to create MessageConsumers for them.
|
I think this means the following test should fail as it tries to create a consumer on the temp queue from a different connection than the one that owns the temp queue. But it passes.
| public void testTemporaryQueueScope()
| {
| try
| {
| // we stop both sender and receiver connections
| senderConnection.stop();
| receiverConnection.stop();
| // we create a temporary queue to receive messages
| tempQueue = receiverSession.createTemporaryQueue();
| // we recreate the sender because it has been
| // already created with a Destination as parameter
| senderSession.createConsumer(tempQueue);
| }
| catch (JMSException e)
| {
| fail(e);
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223025#4223025
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223025
More information about the jboss-dev-forums
mailing list