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 398CE9CFB for ; Thu, 23 Feb 2012 14:40:00 +0000 (UTC) Received: (qmail 26634 invoked by uid 500); 23 Feb 2012 14:39:59 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 26599 invoked by uid 500); 23 Feb 2012 14:39:59 -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 26591 invoked by uid 99); 23 Feb 2012 14:39:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 14:39:59 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.214.45 as permitted sender) Received: from [209.85.214.45] (HELO mail-bk0-f45.google.com) (209.85.214.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 14:39:53 +0000 Received: by bkuw11 with SMTP id w11so478464bku.32 for ; Thu, 23 Feb 2012 06:39:33 -0800 (PST) Received-SPF: pass (google.com: domain of claus.ibsen@gmail.com designates 10.112.98.37 as permitted sender) client-ip=10.112.98.37; Authentication-Results: mr.google.com; spf=pass (google.com: domain of claus.ibsen@gmail.com designates 10.112.98.37 as permitted sender) smtp.mail=claus.ibsen@gmail.com; dkim=pass header.i=claus.ibsen@gmail.com Received: from mr.google.com ([10.112.98.37]) by 10.112.98.37 with SMTP id ef5mr677515lbb.73.1330007973597 (num_hops = 1); Thu, 23 Feb 2012 06:39:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=BcqjjfbCLUG0hV9Mdxm206q7a0jYy2maiwG5tq7fW38=; b=ZTXnsy+z8i2bH/S7MlBkH/VW3Tkesvz5WDPfcXOlLu1Tz6I5AxCyTUGk5a4mnN+Tc2 iF197KG0GI7kbeElQ7MUEuu5XZtKHaxHrVBSjO5vpc+M/bkBFk9Yo3QuUFcslGs7Z3kZ phDUM4zhR+QKXUX8gl807Xo7qO1IsVav1TEyo= Received: by 10.112.98.37 with SMTP id ef5mr571591lbb.73.1330007973408; Thu, 23 Feb 2012 06:39:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.87.100 with HTTP; Thu, 23 Feb 2012 06:39:13 -0800 (PST) In-Reply-To: <392E7ED9F266794DA841B356A22CF5B8C7E926A545@MBXNDA.headstrong.com> References: <392E7ED9F266794DA841B356A22CF5B8C7E926A51E@MBXNDA.headstrong.com> <392E7ED9F266794DA841B356A22CF5B8C7E926A52C@MBXNDA.headstrong.com> <392E7ED9F266794DA841B356A22CF5B8C7E926A545@MBXNDA.headstrong.com> From: Claus Ibsen Date: Thu, 23 Feb 2012 15:39:13 +0100 Message-ID: Subject: Re: OnException - Stopping context To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Feb 23, 2012 at 3:36 PM, Narita Bagchi wrote: > I understand that is the ideal way of stopping the CamelContext in normal= scenario. Should I be opting the same approach along with, OnException cla= use? > > http://camel.apache.org/exception-clause.html link somewhere says - > " If handled is true, then the thrown exception will be handled and Camel= will not continue routing in the original route, but break out." > What is meant by this, then? Its stopping the *current* message from being continued to be routed. CamelContext will still be running. > > I am basically trying to stop the CamelContext on the event of an Excepti= on. > This is different. Stopping CamelContext essentially mean stop Camel itself= . > Thanks. > Regards, > Narita > > -----Original Message----- > From: Claus Ibsen [mailto:claus.ibsen@gmail.com] > Sent: Thursday, February 23, 2012 8:00 PM > To: users@camel.apache.org > Subject: Re: OnException - Stopping context > > On Thu, Feb 23, 2012 at 3:28 PM, Narita Bagchi wrote: >> I want to stop the CamelContext. >> > > Then you have to call stop() on the CamelContext. > > And mind that it will use graceful shutdown, so read this FAQ http://came= l.apache.org/how-can-i-stop-a-route-from-a-route.html > >> Thanks. >> Regards, >> Narita >> >> -----Original Message----- >> From: Claus Ibsen [mailto:claus.ibsen@gmail.com] >> Sent: Thursday, February 23, 2012 7:55 PM >> To: users@camel.apache.org >> Subject: Re: OnException - Stopping context >> >> On Thu, Feb 23, 2012 at 3:21 PM, Narita Bagchi wrote: >>> What is the right way of stopping the context, onException occurrence ? >>> >>> I have tried the following - >>> >>> 1) =A0 =A0 =A0 =A0handled(true).end(); >>> >>> 2) =A0 =A0 =A0 =A0continued(false).end(); >>> >>> 3) =A0 =A0 =A0 =A0handled(true).stop(); >>> >>> None of the above seems to be working. >>> >> >> What do you want to stop? >> >> >> >>> Thanks. >>> Narita >>> >>> ________________________________ >>> ***The information transmitted is intended only for the person or >>> entity to which it is addressed and may contain confidential and/or >>> privileged material. Any review,retransmission,dissemination or other >>> use of, or taking of any action in reliance upon, this information by >>> persons or entities other than the intended recipient is prohibited. >>> If you received this in error, please contact the sender and delete >>> the material from any computer.*** >> >> >> >> -- >> Claus Ibsen >> ----------------- >> FuseSource >> Email: cibsen@fusesource.com >> Web: http://fusesource.com >> Twitter: davsclaus, fusenews >> Blog: http://davsclaus.blogspot.com/ >> Author of Camel in Action: http://www.manning.com/ibsen/ >> >> ***The information transmitted is intended only for the person or >> entity to which it is addressed and may contain confidential and/or >> privileged material. Any review,retransmission,dissemination or other >> use of, or taking of any action in reliance upon, this information by >> persons or entities other than the intended recipient is prohibited. >> If you received this in error, please contact the sender and delete >> the material from any computer.*** > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: cibsen@fusesource.com > Web: http://fusesource.com > Twitter: davsclaus, fusenews > Blog: http://davsclaus.blogspot.com/ > Author of Camel in Action: http://www.manning.com/ibsen/ > > ***The information transmitted is intended only for the person or entity = to which it is addressed and may contain confidential and/or privileged mat= erial. Any review,retransmission,dissemination or other use of, or taking o= f any action in reliance upon, this information by persons or entities othe= r than the intended recipient is prohibited. If you received this in error,= please contact the sender and delete the material from any computer.*** --=20 Claus Ibsen ----------------- FuseSource Email: cibsen@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/