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: <handled/>
Date Tue, 18 Jan 2011 15:26:12 GMT
Hi

Read chapter 5 in the Camel in Action book, it covers all about error handling.


On Tue, Jan 18, 2011 at 4:20 PM, Remi Malessa <rem@llgc.org.uk> wrote:
> Hi.
> Could you please explain me what is the difference in handling an exception
> with two methods below?
>
> 1) I use <handled/> :
>
> <bean id="readException"
> class="my.camel.package.ReadMessageExceptionClass"/>
> .
> .
> .
> <onException>
> <exception>my.camel.package.ErrorFoundException</exception>
> <handled><static>true</static><handled>
> <bean ref="readException"/>
> <to uri="activemq:read_error_queue"/>
> </onException>
>
> 2) I don't use <handled/>
>
> <onException>
> <exception>my.camel.package.ErrorFoundException</exception>
> <to uri="class:my.camel.package.ReadMessageExceptionClass"/>
> <to uri="activemq:read_error_queue"/>
> </onException>
>
>
> As far as I tested the two above, the results from both methods are the
> same..., but are they ?
> The class my.camel.package.ReadMessageExceptionClass, returns a message ,
> with text body , saying what was the
> exception and the message body.
>
> Thanks
> Remi
>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message