activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gupabhi <abhi.gu...@morganstanley.com>
Subject Creating queue and accessing them through different session
Date Fri, 18 Apr 2008 15:37:20 GMT

Hi,
    I'm new to ActiveMQ. Here is my usecase:  I want to create a queue using
a non-transacted session. Put in a message in that queue.  And then access
the message from that queue from a different transacted session.

To put in the message I do:
nonTxSession = (QueueSession) queueConnection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
requestQueue = session.createQueue("REQUEST");
requestQueueSender = nonTxSession .createSender(requestQueue);
Message message = getCurrentSession().createTextMessage("MyMsg");
qs.send( message );


I receive the message through Springs DefaultMessageListernerContainer, with
a JMSTransactionManager in it. 
So bascially, it creates a consumer with the same name as the requestQueue
above ("REQUEST").
But the receive return with a "null".

What am I missing?

Thanks,
Abhi

P.S. I'm using version 4.1. Does that make a diff?




-- 
View this message in context: http://www.nabble.com/Creating-queue-and-accessing-them-through-different-session-tp16763515s2354p16763515.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message