Re: onException is ignored

2015-01-14 Thread Willem Jiang
I just saw the org.slf4j.helpers.MarkerIgnoringBase is use to write the warning and error message. I guess it may relate to your log configuration. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter:

Re: onException is ignored

2015-01-12 Thread James Green
Mea culpa. Who knew AccountNumberFoundException was part of javax.security..! Fixed the import, the onException now executes. However, the .log line: .log(LoggingLevel.ERROR, com.foo.server.ngw, Account Not Found. Message discarded.).stop(); Actually writes the line:

Re: onException is ignored

2015-01-12 Thread James Green
So when using onException it's really important not to use a component that is already partaking in the transaction being rolled back? I get that now, but it's not immediately obvious. Does this explain why the log()ged message, Account Not Found. Message discarded. does not appear in the console

Re: onException is ignored

2015-01-12 Thread Claus Ibsen
Hi No the onException should be triggered even for TX. You may try to configure onException after errorHandler. On Mon, Jan 12, 2015 at 11:02 AM, James Green james.mk.gr...@gmail.com wrote: So when using onException it's really important not to use a component that is already partaking in

Re: onException is ignored

2015-01-12 Thread James Green
As suggested: errorHandler(transactionErrorHandler().maximumRedeliveries(3)); onException(AccountNotFoundException.class) .log(LoggingLevel.ERROR, com.foo.server.ngw, Account Not Found. Message discarded.).stop(); from(source())

Re: onException is ignored

2015-01-09 Thread Willem Jiang
If the Exception is thrown from the source() endpoint, the onException error handler won’t work as you expected. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On

Re: onException is ignored

2015-01-09 Thread Claus Ibsen
Since you use transactions then sending a message to a JMS queue is also rolled back, and hence the onException appears to not send the message to the account not found queue. But its because the tx is rolled back. You can define a 2nd jms component, eg using a different name than jms, that does

onException is ignored

2015-01-09 Thread James Green
Project is Spring based with Camel 2.14 and the following configuration: onException(AccountNotFoundException.class) .log(Account Not Found. Message discarded.).to(jms:queue:RouterAccountNotFound).stop();

onException() silently ignored if after transacted()

2009-12-14 Thread Dragisa Krsmanovic
Here is me with more questions/bug report. I've noticed that Camel can be very sensitive on order operators are invoked in route builder. For example, transacted() has to be after onException(). Otherwise, onException() is completely ignored and message will just pass through error handling code

Re: onException() silently ignored if after transacted()

2009-12-14 Thread Claus Ibsen
can be very sensitive on order operators are invoked in route builder. For example, transacted() has to be after onException(). Otherwise, onException() is completely ignored and message will just pass through error handling code like it's the part of regular route. See example: // Fails from