Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 8812 invoked from network); 12 Nov 2007 09:04:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Nov 2007 09:04:57 -0000 Received: (qmail 63563 invoked by uid 500); 12 Nov 2007 09:04:45 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 63538 invoked by uid 500); 12 Nov 2007 09:04:44 -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 63529 invoked by uid 99); 12 Nov 2007 09:04:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 01:04:44 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.strachan@gmail.com designates 64.233.166.178 as permitted sender) Received: from [64.233.166.178] (HELO py-out-1112.google.com) (64.233.166.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 09:04:45 +0000 Received: by py-out-1112.google.com with SMTP id p76so1159387pyb for ; Mon, 12 Nov 2007 01:04:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; 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=1Uib8xv3/CAs+zcwOMlT9WGZvyYOq1y01cARI2O/D/A=; b=KS74X2m1TZo34jKoZPCCiy8JgCdXbCAOd4Y2Nk9zRkcNkcxHVicyGHMYEUP29c0yVDUDW5LcV5MgTGcKr55p26l5V9DjtFaoOQSsWli/lUoH3EIpGKvP20j4+F9Sov5b75gxVTZikx56rdaqUO2D1T55t1PvaPto2Nsn3CJRfKA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TLeb6oOT77RwwjblyYKvMx8spXRZ3H5Jav578GmKTqoT2tWWxcmq7Gx+J3DYVTvN6agV/d4Ky4Pe4g0IKmWw/yzBYmfz4FwYwL2PhA3O0IWV9oxO69E3/xyk0sfUuMKWpirKMXHDP/a9R90R3iMBblHdS0dI/LeSVnCDz576a8Y= Received: by 10.65.216.19 with SMTP id t19mr3257693qbq.1194858259993; Mon, 12 Nov 2007 01:04:19 -0800 (PST) Received: by 10.65.204.2 with HTTP; Mon, 12 Nov 2007 01:04:19 -0800 (PST) Message-ID: Date: Mon, 12 Nov 2007 09:04:19 +0000 From: "James Strachan" To: users@activemq.apache.org Subject: Re: Messages not being received by consumer In-Reply-To: <13672078.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <13672078.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org It looks like you're creating a transactional session and never calling commit(). On 09/11/2007, CobraTheSleek wrote: > > Hi, > > ENV: > ActiveMQ-Snapshot-5.0 > JBoss AS 4.2.1 > > I have the following queues defined: > > name="activemq.queue:name=org.apache.activemq.requestQueue"> > activemq/requestQueue > optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra.rar' > javax.jms.Queue > name="Properties">PhysicalName=org.apache.activemq.requestQueue > > > name="activemq.queue:name=org.apache.activemq.replyQueue"> > activemq/echoResponseQueue > optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra.rar' > javax.jms.Queue > name="Properties">PhysicalName=org.apache.activemq.replyQueue > > > I have an MDB defined that listens for messages from the requestQueue and > posts a response on the replyQueue. > > I am using the Spring unit tests provided (Producer and Consumer) and my > Producer sends messages to the requestQueue, the MDB receives the request > and posts a message back on to the replyQueue. > > I can see that there are messages in the replyQueue via JMX. However, my > Consumer never receives messages from the replyQueue. > > If I run the test without the MDB, by placing messages in the replyQueue via > the PRODUCER, my Consumer receives the messages successfully. In other words > messages posted by the MDB are never received by the consumer. > > The following is what my MDB does to place messages back on the reply queue: > > InitialContext initCtx = new InitialContext(); > > QueueConnectionFactory qcf = (QueueConnectionFactory) initCtx > .lookup("java:comp/env/jms/MyQueueConnectionFactory"); > > QueueConnection qcon = qcf.createQueueConnection(); > QueueSession qsession = qcon.createQueueSession(true, 0); > Queue q = (Queue) initCtx.lookup("activemq/replyQueue"); > QueueSender qsender = qsession.createSender(q); > > TextMessage message = qsession.createTextMessage(); > > message.setText(response); > qsender.setTimeToLive(100000000); > qsender.send(message); > > qsender.close(); > qsession.close(); > qcon.close(); > > > I am quite confused as to why this is happening as I see messages as being > available in the replyQueue. > Any tips would be appreciated. > > -- > View this message in context: http://www.nabble.com/Messages-not-being-received-by-consumer-tf4779201s2354.html#a13672078 > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- James ------- http://macstrac.blogspot.com/ Open Source SOA http://open.iona.com