camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: testing transaction
Date Mon, 17 Jan 2011 08:17:03 GMT
Try with latest source code. (SNAPSHOT) or when 2.6 has been released.
http://camel.apache.org/download


On Mon, Jan 17, 2011 at 9:14 AM, niconic <nicolas.nicaise@gmail.com> wrote:
>
> 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.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message