camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remi Malessa <...@llgc.org.uk>
Subject <handled/>
Date Tue, 18 Jan 2011 15:20:39 GMT
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


Mime
View raw message