Re: Exception handling in Camel Routes.

2012-07-17 Thread Christian Müller
Could you have a look at [1]? There are many tests which make sure it works. And if it doesn't work for you, could you please attach a test which indicate this. With a test it's much more easier for us to check what's going wrong - in your code or in Camel. And at the end, you will have a solution

Re: Exception handling in Camel Routes.

2012-07-16 Thread smadarapu
Hi Christian, If you read my initial post, my question is what am I missing. I had what you suggested but its not working. Christian Mueller wrote > > It's documented here [1]. > > You can e.g. do: > from("direct:start") > > .onException(MyTechnicalException.class).maximumRedeliveries(0).handl

Re: Exception handling in Camel Routes.

2012-07-14 Thread Christian Müller
It's documented here [1]. You can e.g. do: from("direct:start") .onException(MyTechnicalException.class).maximumRedeliveries(0).handled(true).end() .onException(MyFunctionalException.class).maximumRedeliveries(0).handled(true).to("bean:myOwnHandler").end() .choice() .when().xpath("//type =

Re: Exception handling in Camel Routes.

2012-07-13 Thread smadarapu
Can you please elaborate "A route can have a N+ route scoped onException's. That is possible." In my case when I had the onException on the route, whatever the code i put for onException got executed immediately after a message arrived to that route (without an actual exception), and not when that

Re: Exception handling in Camel Routes.

2012-07-12 Thread Claus Ibsen
On Thu, Jul 12, 2012 at 6:09 PM, smadarapu wrote: > I think i figured it out, the "onException" set up is per RouteBuilder and > not per Route, so I removed the onException setup from route to the route > builder and it is working as i want it. > > What i still don't understand is why does the Rou

Re: Exception handling in Camel Routes.

2012-07-12 Thread Willem Jiang
You can use the try ... catch ... finally DSL[1] if you want to check the exception you want per route. The "onException" is a more generic way to handle the exception per RouteBuilder. [1]http://camel.apache.org/try-catch-finally.html On Fri Jul 13 00:09:02 2012, smadarapu wrote: I think i

Re: Exception handling in Camel Routes.

2012-07-12 Thread smadarapu
I think i figured it out, the "onException" set up is per RouteBuilder and not per Route, so I removed the onException setup from route to the route builder and it is working as i want it. What i still don't understand is why does the Route definition supports the "onException" setup, what is the