Camel: 2.2.0:
i have route builder which adds a route as follows with a deadLetterChannel
as a fallback error handler and an onException fork:
errorHandler(deadLetterChannel("bean:myBean?method=processError"));
//
from(fromUri).to(toUri).end().
onException(Exception.class).process(new
MyErrorHandler(fromUri)).stop();
Problem is: when the message cannot be routed to the destination endpoint
(say, because the endpoint URI is not reachable)
the onException nominated ErrorHandler is never invoked; instead the
deadLetterChannel()
is invoked. This would be fine except for the fact that I need an
application context
in the error handler for cleanup: while I am able to pass the required
context to my
onException error handler (as shown above), I am not sure how to do that
with the
deadLetterChannel.
Questions:
- why isn't onException() method invoked?
- is there a way to pass an arbitrary data to a bean which is used as an
endpoint. Eg:
to("bean:myBean?method=processError&arg="+fromUri)
regardds,
/U
--
View this message in context:
http://old.nabble.com/onException%28%29-tp28008233p28008233.html
Sent from the Camel - Users mailing list archive at Nabble.com.