Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 66322 invoked from network); 23 Apr 2008 11:56:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2008 11:56:15 -0000 Received: (qmail 17988 invoked by uid 500); 23 Apr 2008 11:56:15 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 17975 invoked by uid 500); 23 Apr 2008 11:56:15 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 17964 invoked by uid 99); 23 Apr 2008 11:56:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 04:56:15 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.strachan@gmail.com designates 64.233.184.233 as permitted sender) Received: from [64.233.184.233] (HELO wr-out-0506.google.com) (64.233.184.233) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2008 11:55:30 +0000 Received: by wr-out-0506.google.com with SMTP id 69so1444652wri.5 for ; Wed, 23 Apr 2008 04:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=RFL1UVSmML2eWlB2/ztP1uBB7SncaVthaeSSNRLSSmQ=; b=l6wzfVgEQYYBTtpu/qIsHm0REh28GtKlNnszhmF+cMDF25UEFeYMT32bS59sGKqwFCofdL9WrAJvob2Oj8fl3l/Mx6WsMVV8nfDOsd7GaUpBpBt2jXW6tfqrqIATZwtoYGbpWpoFe/MWomrvXrIDRaQWIKanFfTStOm2JfU2ykM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Rptq+fnpfdDdKiPyUehiUnzDc1O4jE3fHO6w/QHW7o27csQia8ugryxia1WDIVRUWEI+HAiA9s89PsGjsOV6vEFxoKMKHcGiUPfa7RVZc6iPvTWCutg07whB624H0rPSaaKpOC0wDjRTWEDJZi+jpmrIA0uA7hyhhQaRA+xSMMI= Received: by 10.150.157.17 with SMTP id f17mr273315ybe.234.1208948125203; Wed, 23 Apr 2008 03:55:25 -0700 (PDT) Received: by 10.150.148.20 with HTTP; Wed, 23 Apr 2008 03:55:25 -0700 (PDT) Message-ID: Date: Wed, 23 Apr 2008 11:55:25 +0100 From: "James Strachan" To: users@activemq.apache.org Subject: Re: Creating queue and accessing them through different session In-Reply-To: <16763515.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <16763515.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org On 18/04/2008, gupabhi wrote: > > 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". I don't follow - there's no Message object - or the payload is empty? What you describe should work - its normal JMS to send a message to a queue and then consume it later on with a different session -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com