camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to propagate exception?
Date Wed, 10 Mar 2010 12:30:45 GMT
On Wed, Mar 10, 2010 at 12:28 PM, Muhammad Ichsan <ichsan@gmail.com> wrote:
> Hi All
>
> Based on the following routes:
>
> <route>
>        <from uri="direct:message/>
>
>        <onException>
>                <exception>my.fragile.Exception</exception>
>                <to uri="mock:isItPossibleToCatchHere"/>
>        </onException>
>
>        <to uri="direct:methodInvocation"/>
> </route>
>
> <route>
>        <from uri="direct:methodInvocation"/>
>        <to uri="bean:fragileBean?method=invokeWithPossibleException"/>
> </route>
>
> Is it possible to use the <onException> tag there?
>

Yes its a route scoped onException then.
You can also set it as a CamelContext scoped instead (think global).

Chapter 5 in the Camel in Action books covers really well about Camel
error handling, which has many features.
The wiki pages at Apache is IMHO full of details but I think it lacks
a good picture and to guide you through the subject
so you would understand it.
http://www.manning.com/ibsen

You can start here
http://camel.apache.org/error-handling-in-camel.html



> Thanks
>
> --
> ~The best men are men who benefit to others
> http://michsan.web.id
>
> Yang berkualitas memang beda rasanya!
> http://rizqi-cookies.com
>



-- 
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

Mime
View raw message