Hi everyone,

I have an integration flow composed of two camel routes.

The first route validates the incoming message against an XML schema,
transforms it and sends it forth to the second route.

The second route validates the message against an XML Schema and if the
result is a pass, sends the message over to another endpoint. However, if
the validation fails, there is an exception(ValidationException.class)...
instruction that captures the exception and does the following processing:
logs it and creates an error reply message, which is sent back to the first
route.

However, what happens is that when the first route receives this reply
message, it triggers its own Exception handling mechanism (another
exception(ValidationException.class)... instruction), handling the message
again. Its like the Exception is being propagated back!

This behaviour is not what I expected, since the Exception was already dealt
with accordingly by the route that was responsible for it when the error was
raised..... So my question is, how can I remove the Exception information
from the Exchange before it is sent back to route 1, so that the reply is
not interpreted as an Exception again?

Also, another odd behaviour that I am experiencing is that if I set the
following at the top of my route: errorHandler(noErrorHandler());   none of
the configured exception(...) statements are triggered in case of an
exception. Why is this? Are both statements exclusive?

Many thanks!!

Raul.



-- 
View this message in context: 
http://www.nabble.com/Exception-Handling-tp19863662s22882p19863662.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to