Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 43876 invoked from network); 4 Apr 2007 16:10:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Apr 2007 16:10:24 -0000 Received: (qmail 37332 invoked by uid 500); 4 Apr 2007 16:10:30 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 37305 invoked by uid 500); 4 Apr 2007 16:10:30 -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 37296 invoked by uid 99); 4 Apr 2007 16:10:30 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 09:10:30 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [159.182.31.5] (HELO ncspsmtp2.ncs.com) (159.182.31.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 09:10:23 -0700 Received: from iowacexchbrg.ic.ncs.com (Not Verified[10.25.4.190]) by ncspsmtp2.ncs.com with NetIQ MailMarshal (v5.5.6.7) id ; Wed, 04 Apr 2007 11:09:57 -0500 Received: from IOWACSRVE3WM04.NCSP.PEROOT.COM (iowacsrve3smtp2.ic.ncs.com [10.25.5.85]) by iowacexchbrg.ic.ncs.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id FQK8HDXX; Wed, 4 Apr 2007 11:10:02 -0500 Received: from IOWACSRVE3MX04.NCSP.PEROOT.COM ([10.25.4.132]) by IOWACSRVE3WM04.NCSP.PEROOT.COM with Microsoft SMTPSVC(6.0.3790.1830); Wed, 4 Apr 2007 11:09:58 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: DefaultMessageListenerContainer + not remove messages until processed Date: Wed, 4 Apr 2007 11:09:57 -0500 Message-ID: In-reply-to: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: DefaultMessageListenerContainer + not remove messages until processed Thread-Index: Acd20oCxJLuU37BrRNyvhbs5MSnbiwAAIF1w References: From: "Garner, Shawn" To: X-OriginalArrivalTime: 04 Apr 2007 16:09:58.0064 (UTC) FILETIME=[B0DA9300:01C776D3] X-Virus-Checked: Checked by ClamAV on apache.org I put a org.springframework.jms.connection.JmsTransactionManager on the DefaultMessageListenerContainer but all this does is roll back any changes I made after consuming the message.=20 I am also using the org.jencks.factory.TransactionManagerFactoryBean and org.jencks.factory.ConnectionManagerFactoryBean since I'm in Tomcat without any EJB layer. It does not put the message back into the queue like I want. How do you enable client-acknowledge mode? Shawn=20 -----Original Message----- From: James Strachan [mailto:james.strachan@gmail.com]=20 Sent: Wednesday, April 04, 2007 11:01 AM To: users@activemq.apache.org Subject: Re: DefaultMessageListenerContainer + not remove messages until processed Try using transacted mode and Spring transactions, or using client-acknowledge mode. On 4/4/07, Garner, Shawn wrote: > I would like the message queue to keep the message until I am finished > with processing and explicitly tell it the message can be removed. > > I'm using > org.springframework.jms.listener.DefaultMessageListenerContainer to > deliver the message to a POJO but it seems once the message is delivered > it is out of the queue. > > So now if I shut down the java vm running the broker the message has > already been consumed and does not get delivered when the vm is started > backup again. > > Can somebody tell me some approaches to doing this? > > > > All my ActiveMQ settings, POJO consumer, POJO producer are in a spring > context file loaded when the web-application starts. > > > > Shawn > > > > --=20 James ------- http://radio.weblogs.com/0112098/