Hello,

I've tested with aop but i've exactly the same problem:

from("direct:beforemapper"+getBeanReference())
   .choice()
    .when(simple("${in.header.txtest} contains 'ThrowExceptionAfterFrom')
        .throwException(new RuntimeException("RuntimeException for
transaction testing"))
    .end();
              
from(getRouteFrom())
  .onException(Exception.class).useOriginalMessage()
     .handled(true)
     .to(getRouteDL())
  .end()
  .transacted("required")
  .aop().before("direct:beforemapper"+getBeanReference())
    .beanRef(getMapper(), "mapToMessageDto")
  .end()
  ....         

The exception is well thrown and in my console:

WARN  [DefaultMessageListenerContainer] Execution of JMS message listener
failed, and no ErrorHandler has been set.
org.apache.camel.RuntimeCamelException: java.lang.RuntimeException:
RuntimeException for transaction testing
...
WARN  [TransactionErrorHandler] Transaction rollback (0...

-> The onexception block is not called
i'm using the 2.5 version of camel.

Have you another method to test my transaction configuration.

Thank you,

Nicolas
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/testing-transaction-tp3339993p3344039.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to