Hi David,

You can configure the Camel JMS consumer component as a transactional
client (see camel 2.0 - jms /
http://camel.apache.org/transactional-client.html)
and Camel route with <transacted> option (Camel 2.0 - Database Sample
/ http://camel.apache.org/transactional-client.html). In this
scenario, 2 Tx managers will be used (JMS / JPA) but not at all
synchronized. This means that an error could occur after the exchange
completed by the camel route, record committed in the DB but JMS
rollbacked.

Regards,

Charles Moulliard

Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard



On Sun, Oct 30, 2011 at 7:59 PM, David Karlsen <davidkarl...@gmail.com> wrote:
> Hi.
>
> I have a route with two transactional resources, stripped down it is:
>
>                <camel:route>
>                        <camel:from uri="{{incoming.filedir}}" />
>                        <camel:from ref="myQueueEndpoint" />
>                        <camel:transacted />
>                        <camel:to 
> uri="jpa:?persistenceUnit=myPersistenceUnit&amp;usePersist=true" />
>                </camel:route>
>
>
> How do I apply transactionality for the jpa endpoint in addition to the JMS 
> one?
> I do not want to use XA (which would have only one common transactionmanager).
> Do I have to split the route in two and pass on the message over a
> direct channel and stick in a JPA transactionmanager in the second
> one?
>
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen
>

Reply via email to