camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphaël Delaporte <raphael.delapo...@gmail.com>
Subject Transaction rollback to JBI endpoint
Date Sat, 16 Jan 2010 18:41:30 GMT
Hi,

I'm using Camel 1.6 with ServiceMix 3.3.

This is my route :
JBI JMS consumer (with ServiceMix) -> Camel JBI endpoint -> Bean.

My JMS consumer is XA transacted and when it fails to call the Camel JBI
endpoint, the JMS Message is rolledback into the queue (this is what I
want).

But if I call the JBI Camel endpoint, and if my bean throws an Exception,
the JMS message is not rolledback into the queue. I want the transaction to
be rolledback on any errors in the Camel routes.
Here is my configuration

    from("jbi:endpoint:http://esb/CamelTransac/transac")
            .to(LOG)
            .beanRef("routes", "erreur");


    public void erreur() throws Exception {
        Thread.sleep(1000);
        throw new Exception("erreur !");
    }

I have tried to set errorHandler(noErrorHandler()), but it does the same
thing.

Any ideas ?

Thanks !
Raphaël

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message