Did your below scenario worked yet? I am trying to build a similar flow 
I am using smx4, but I am sure any insight will help 
i have flow like as below 
smx jms consumer->camel router-> http provider
I am trying to build XA transaction  which will be  will started from jms
consumer. I could not find any good document from servicemix documentation
site. It will be a great help if you can provide me some information of how
you implemented transaction here.
Thank you very much


Raphaël Delaporte wrote:
> 
> Hi,
> 
> I'm using SMX 3.3.1 with the JMS component 2009.01.
> 
> I use the jms-consumer endpoint in the XA transacted mode.
> This works, because if I want to test the transactionnal behaviour, I
> specify some wrong service endpoint and my JMS message is rolledback to
> the
> queue. So that's OK.
> 
> But my route calls the Camel JBI endpoint within the transaction.
> If I throw any exception from a camel bean, the transaction is not
> rolledback, and the JMS message is not redelivered into the queue.
> It seems the transaction is commited.
> 
> Here is my configuration :
> 
> --- JMS SMX component -----
> <jms:consumer service="esb:jmsConsumerTrans" endpoint="jmsConsumer"
>         targetService="esb:CamelTrans" targetEndpoint="trans"
>         destinationName="queue/in" connectionFactory="#connectionFactory"
>         transacted="xa" />
> 
> 
> --- Camel route -----
> public void configure() throws Exception {
> 
>         errorHandler(noErrorHandler());
> 
>         from("jbi:endpoint:http://esb/CamelTrans/trans";)
>         .to(LOG)
>         .beanRef("routes", "erreur");
> 
>     }
> 
>     public void erreur() throws Exception {
>         Thread.sleep(1000);
>         throw new Exception("erreur ...");
>     }
> 
> 
> 
> There is something strange to me (and this is why I guess this is a SMX
> related and not Camel related). I've enabled the debug mode, and I can see
> the content of the messages. In the last exchange, I can see an error
> field
> with my exception (the one which comes from the Camel endpoint I guess)
> 
> WARN  - SimpleEndpoint                 - SimpleEndpoint.fail called:
> DEBUG - DeliveryChannelImpl            - Send
> ID:192.168.0.3-12638f8f9d2-11:0 in DeliveryChannel{servicemix-camel}
> DEBUG - SecuredBroker                  - send exchange with secure broker
> DEBUG - SedaFlow                       - Called Flow send
> DEBUG - SedaQueue                      -
> org.apache.servicemix.jbi.nmr.flow.seda.sedaqueu...@517bc3 dequeued
> exchange: InOnly[
>   id: ID:192.168.0.3-12638f8f9d2-11:0
>   status: Error
>   role: consumer
>   service: {http://esb}CamelTrans
>   endpoint: trans
>   in: <?xml version="1.0" encoding="UTF-8"?><requete xmlns="http://esb"/>
>   error: java.lang.Exception: erreur ...
> ]
> DEBUG - DeliveryChannelImpl            - Notifying exchange
> ID:192.168.0.3-12638f8f9d2-11:0(1b9bbe8) in
> DeliveryChannel{servicemix-jms}
> from processInboundSynchronousExchange
> DEBUG - DeliveryChannelImpl            - Notified:
> ID:192.168.0.3-12638f8f9d2-11:0(1b9bbe8) in
> DeliveryChannel{servicemix-jms}
> from sendSync
> 
> 
> Thanks for your help !
> Raphaël
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Transaction-rollback-with-Camel-JBI-endpoint-tp27193847p28360258.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to