Marking the JMS component as "transacted" and giving it a reference to
the JmsTransactionManager will cause it to do JMS transactions.

On Fri, Sep 21, 2012 at 4:55 PM, mabahma <maba...@hotmail.com> wrote:
> Hello all,
>
> We are using distributed transaction in a Camel route where messages are
> sent to a JMS queue (ActiveMQ broker) then picked by a processor bean and
> persisted in Oracle database.
>
> We first used XA transactions with Atomikos but the performances (number of
> processed messages) were not 't as good as expected.
>
> So we want now to use the scenario in "compensation transaction" sample with
> two transactions managers.
>
> Have any one tried the two options ?  are the performances better in one or
> other case ?
>
> or is there any other option that gives better performances ?
>
> If the processor fails to persist a message into DB how , can we roll back
> the jms message ?
>
>
> *public void process(Exchange exchange){
>
>
>  Strring msg  =  exchange.getIn().getBody;
>
>
> Dao.persist(msg)
>
> // if persist fails, how to tell camel not ot commit jms message here ?
> // we have only acess to exchange..
>
> }
> *
>
>
>
>
> have you any examples ?
>
> There also one thing we don't understand very clearly :
>
> When should we declare a route transacted (XA transactions? two transactions
> managers? never?) ?
> When should we declare JMS queue transacted (XA transactions? two
> transactions managers? never?)
>
> if we go for two transaction managers (jms+jpa), which should be declared
> transacted (route? jms ? both? no one?)
>
> Thanks
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Distributed-transaction-in-camel-route-tp5719279p5719733.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to