Unexpected behaviour of TransactionErrorHandler?

2009-11-20 Thread Martin Krasser
I'm using the TransactionErrorHandler of Camel 2.0.0 and observe an unexpected transaction-outcome for handled errors. Using the TransactionErrorHandler with the route onException(Exception.class).handled(true).process(...); from(direct:test).transacted().processRef('myFailureProcessor');

Re: Unexpected behaviour of TransactionErrorHandler?

2009-11-20 Thread Claus Ibsen
On Fri, Nov 20, 2009 at 10:20 AM, Martin Krasser d...@martin-krasser.de wrote: I'm using the TransactionErrorHandler of Camel 2.0.0 and observe an unexpected transaction-outcome for handled errors. Using the TransactionErrorHandler with the route

Re: Unexpected behaviour of TransactionErrorHandler?

2009-11-20 Thread Martin Krasser
I know that when I don't declare the local exception handler a rollback will occur. But how can I handle the exception for returning a custom response to the sender AND rollback the transaction? Maybe I'm missing something obvious (?). Claus Ibsen schrieb: On Fri, Nov 20, 2009 at 10:20 AM,

Re: Unexpected behaviour of TransactionErrorHandler?

2009-11-20 Thread Claus Ibsen
On Fri, Nov 20, 2009 at 10:35 AM, Martin Krasser d...@martin-krasser.de wrote: I know that when I don't declare the local exception handler a rollback will occur. But how can I handle the exception for returning a custom response to the sender AND rollback the transaction? Maybe I'm missing

Re: Unexpected behaviour of TransactionErrorHandler?

2009-11-20 Thread Claus Ibsen
On Fri, Nov 20, 2009 at 10:36 AM, Claus Ibsen claus.ib...@gmail.com wrote: On Fri, Nov 20, 2009 at 10:35 AM, Martin Krasser d...@martin-krasser.de wrote: I know that when I don't declare the local exception handler a rollback will occur. But how can I handle the exception for returning a

Re: Unexpected behaviour of TransactionErrorHandler?

2009-11-20 Thread Martin Krasser
Using setProperty(Exchange.ROLLBACK_ONLY, Boolean.TRUE) isn't enough for 2.0.0. This causes the TransactionErrorHandler in this version to throw an exception too. In 2-1.SNAPSHOT everything works as expected because of additional logic added to the TransactionErrorHandler. For getting it

Re: Unexpected behaviour of TransactionErrorHandler?

2009-11-20 Thread Claus Ibsen
On Fri, Nov 20, 2009 at 11:13 AM, Martin Krasser d...@martin-krasser.de wrote: Using setProperty(Exchange.ROLLBACK_ONLY, Boolean.TRUE) isn't enough for 2.0.0. This causes the TransactionErrorHandler in this version to throw an exception too. In 2-1.SNAPSHOT everything works as expected

Re: Unexpected behaviour of TransactionErrorHandler?

2009-11-20 Thread Claus Ibsen
On Fri, Nov 20, 2009 at 10:41 AM, Martin Krasser d...@martin-krasser.de wrote: ... not part of the Camel 2.0.0 Javadocs ... Ah my bad. I missed your obvious statement about using 2.0.0. And the new markRollbackOnly() was added in 2.1. And hence its of course not mentioned in the javadoc. Sorry