Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 148865C15 for ; Tue, 10 May 2011 06:40:52 +0000 (UTC) Received: (qmail 15499 invoked by uid 500); 10 May 2011 06:40:51 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 15472 invoked by uid 500); 10 May 2011 06:40:51 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 15464 invoked by uid 99); 10 May 2011 06:40:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2011 06:40:51 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.212.169 as permitted sender) Received: from [209.85.212.169] (HELO mail-px0-f169.google.com) (209.85.212.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 May 2011 06:40:46 +0000 Received: by pxi9 with SMTP id 9so4666281pxi.14 for ; Mon, 09 May 2011 23:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=Jk8QO5/AUN/vB15Dh99RbAQgKt0sxLTijB1TgaeQvTo=; b=ucxWdBjuKxPoiwy23WbsS/b7VTktcN82oOOzb/C8OOjRO+dzjuNEPXGAsArMpKluOR 4mxqq5QVVTT6NQkQ4GZ4htKo7tf2mm+ENIleWu+wKIjaWbLuoS9Hc878O3Ae8nT49iZh sXdI1bMA5b/trlWkOnx8UCrT7oCVKF5M2K10I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=bGCxpfgHs0Fp6BLfiqjlSjHxUt1HwizhppQ+lclrR0JzCfqBLBEK/f64raavY1lAIN fjE0bFWNfxbBRlwx+IRO/jG4OADPW59G4BgRT9IJVRLLvYM/Ny39hLlM0U8IXmR/cOXE UtYIVt/Ktymzj6Xfd5CbAe55pcwXyPUTwMJW4= Received: by 10.68.47.198 with SMTP id f6mr7565881pbn.511.1305009626084; Mon, 09 May 2011 23:40:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.46.67 with HTTP; Mon, 9 May 2011 23:40:06 -0700 (PDT) In-Reply-To: References: <1304942448167-4381695.post@n5.nabble.com> <1304973829545-4382912.post@n5.nabble.com> From: Claus Ibsen Date: Tue, 10 May 2011 08:40:06 +0200 Message-ID: Subject: Re: Problem with JMS transaction To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Remove this As when you use transacted=3Dtrue, it has to use TRANSACTED_ACKNOWLEDGE. So do not override/change this setting. 2011/5/10 C=E9line Bugaud : > Hi Ashwin, > > I didn't sent my entire spring configuration, but my ActiveMQComponent > was already linked to the transactionManager : > > ---------------------------------------------------- > =A0 =A0 =A0 =A0 class=3D"org.apache.activemq.camel.component.ActiveMQComponent" > =A0 =A0 =A0 =A0lazy-init=3D"true"> > =A0 =A0 =A0 =A0 =A0 =A0 ref=3D"amqPoolConnectionFactory"/> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > ---------------------------------------------------- > > However, I tried using two different activeMQComponent, and that > seemed to solve my problem : I no longer loose messages. The > transaction does not seem to work well either : I now have duplicate > messages. > > Regards, > > -- > C=E9line > > On Mon, May 9, 2011 at 10:43 PM, Ashwin Karpe wro= te: >> Hi, >> >> Sorry about the confusion... You do not need the second connection facto= ry >> "activemq2". This is an error on my part. >> >> The key difference in your setup vs mine is that there is a >> "transactionManager" property set in my ActiveMQ component and the >> "transacted" property is set to true . This wires in the transactional >> capability to the ActiveMQ component. >> >> Please see the corrected XML below. >> >> Cheers, >> >> Ashwin... >> >> >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> ---------------------------------------------------- >> > =A0 =A0 =A0 xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" >> =A0 =A0 =A0 xmlns:camel=3D"http://camel.apache.org/schema/spring" >> =A0 =A0 =A0 xsi:schemaLocation=3D" >> =A0 =A0 =A0 =A0 http://www.springframework.org/schema/beans >> http://www.springframework.org/schema/beans/spring-beans.xsd >> =A0 =A0 =A0 =A0 http://camel.apache.org/schema/spring >> http://camel.apache.org/schema/spring/camel-spring.xsd"> >> >> =A0 =A0 >> =A0 =A0 =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 =A0 =A0 >> =A0 =A0 >> >> =A0 =A0> class=3D"org.apache.activemq.ActiveMQConnectionFactory"> >> =A0 =A0 =A0 =A0> value=3D"vm://localhost?broker.persistent=3Dfalse&broker.useJmx=3Dfa= lse"/> >> =A0 =A0 >> >> =A0 =A0> class=3D"org.springframework.jms.connection.JmsTransactionManager"> >> =A0 =A0 =A0 =A0 >> =A0 =A0 >> >> =A0 =A0> class=3D"org.apache.activemq.camel.component.ActiveMQComponent"> >> =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 >> =A0 =A0 >> >> =A0 > class=3D"org.apache.camel.spring.spi.SpringTransactionPolicy"> >> =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 > value=3D"PROPAGATION_MANDATORY" /> >> =A0 >> >> >> > --=20 Claus Ibsen ----------------- FuseSource Email: cibsen@fusesource.com Web: http://fusesource.com CamelOne 2011: http://fusesource.com/camelone2011/ Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/