Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 25693 invoked from network); 1 Apr 2010 12:22:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Apr 2010 12:22:15 -0000 Received: (qmail 57320 invoked by uid 500); 1 Apr 2010 12:22:15 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 57287 invoked by uid 500); 1 Apr 2010 12:22:15 -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 57279 invoked by uid 99); 1 Apr 2010 12:22:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 12:22:15 +0000 X-ASF-Spam-Status: No, hits=-0.2 required=10.0 tests=AWL,FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of norman.maurer@googlemail.com designates 74.125.82.45 as permitted sender) Received: from [74.125.82.45] (HELO mail-ww0-f45.google.com) (74.125.82.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Apr 2010 12:22:11 +0000 Received: by wwb28 with SMTP id 28so681130wwb.32 for ; Thu, 01 Apr 2010 05:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=sczBPmAf/ivY/IlahcoU3xNW4TklzWfA1mxO0el9e4Q=; b=tRw6WATX2fFqFv/0y6E0TzNR1F5N08zc6NrYoQp2PrHfGdyMdnw1cdzM80ewISYTNo R90u2NdBiJ4LE3O1bA9H2HC0ys/QyfEYbgYQ6+q1xyly1ExCeRu8xQ8vQGVWsjludCnt E/V/I0kbtNa9m2qrjyYlyowiJP9Avt66sN2OQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=dRsqO6GrroidPaECr+ZQQ4Zj3JTC9kSMkMR0+aPpAFMCqUQeWCKOup7OlFFJZK7UJt QrzC5nAqSvtXbz6sMAPGSqUy8X+Tjsxa3qcgTl6dUqK/c1t2ioNKQvTPZetrWEp5Z5MT vdjh4xAarD+E53VYuJIPh03GU8OzRJtsbas1g= MIME-Version: 1.0 Received: by 10.216.39.199 with HTTP; Thu, 1 Apr 2010 05:21:49 -0700 (PDT) In-Reply-To: References: Date: Thu, 1 Apr 2010 14:21:49 +0200 Received: by 10.216.86.14 with SMTP id v14mr371160wee.183.1270124509767; Thu, 01 Apr 2010 05:21:49 -0700 (PDT) Message-ID: Subject: Re: Using transacted() in routes and disposing Body From: Norman Maurer To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Ah thx, I thought this will prevent to call the TransactionHandler then.. Bye, Norman 2010/4/1 Claus Ibsen : > On Thu, Apr 1, 2010 at 2:15 PM, Norman Maurer > wrote: >> Hi Claus, >> >> I already do the processor stuff on the end of the route. I need to >> call the dispose stuff when an exception accours while processing the >> route. It should get called before the transaction is rolled back. I'm >> using java dsl for building the routes.. >> > > You should then be able to do > > from(xxx) > .transacted() > .onException(Exception.class).process(myCallDisposeProcessor).end() > .to(yyy) > .to(zzz); > > If you need to do that on all routes you can let onException be > configured on context scope instead of route scope as above. > > >> Thx, >> Norman >> >> >> 2010/4/1 Claus Ibsen : >>> Do you need to call dispose at the end of the route? >>> >>> You could just add a .process step and invoke it from java code? >>> >>> Or maybe use onCompletion to abstract that into its own route? >>> http://camel.apache.org/oncompletion.html >>> >>> >>> >>> On Thu, Apr 1, 2010 at 1:52 PM, Norman Maurer wrote: >>>> Hi all, >>>> >>>> I'm using transacted() on many routes which works very well so far. >>>> But to be sure all resources are recycled I need to call a dispose() >>>> method on my object which is hold in the Body of the Message of the >>>> Exchange. How would I configure camel to call the method on the Body >>>> and then just continue to use thr TransactionErrorHandler ? >>>> >>>> Is it possible ? >>>> >>>> Thx, >>>> Norman >>>> >>> >>> >>> >>> -- >>> Claus Ibsen >>> Apache Camel Committer >>> >>> Author of Camel in Action: http://www.manning.com/ibsen/ >>> Open Source Integration: http://fusesource.com >>> Blog: http://davsclaus.blogspot.com/ >>> Twitter: http://twitter.com/davsclaus >>> >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus >