Re: Distributed transaction in camel route

2012-09-22 Thread James Carman
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 wrote: > Hello all, > > We are using distributed transaction in a Camel route where messages are > sent to a JMS queue (A

Re: Distributed transaction in camel route

2012-09-21 Thread mabahma
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 a

Re: Distributed transaction in camel route

2012-09-19 Thread Caa_man
http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:tx="http://www.springframework.org/schema/tx"; xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xs

Re: Distributed transaction in camel route

2012-09-18 Thread James Carman
Would you be willing to share your configuration (except for passwords) that works for you so that other folks "googling" might be able to learn from what you've discovered? On Tue, Sep 18, 2012 at 7:39 AM, Caa_man wrote: > Thank you! > > Distributed transaction really works with value="false"/

Re: Distributed transaction in camel route

2012-09-18 Thread Christian Müller
Good to know you could figure it out by yourself. Enjoi your further Camel ride, Christian Sent from a mobile device Am 18.09.2012 13:45 schrieb "Caa_man" : > Thank you! > > Distributed transaction really works with value="false"/> and com.ibm.mq.jms.MQXAConnectionFactory class using. > > > >

Re: Distributed transaction in camel route

2012-09-18 Thread Caa_man
Thank you! Distributed transaction really works with and com.ibm.mq.jms.MQXAConnectionFactory class using. -- View this message in context: http://camel.465427.n5.nabble.com/Distributed-transaction-in-camel-route-tp5719279p5719521.html Sent from the Camel - Users mailing list archive at Nabb

Re: Distributed transaction in camel route

2012-09-17 Thread Christian Müller
I updated my sample project with a new sample test for "compensation transaction": https://github.com/muellerc/camel-in-transaction/blob/master/src/test/java/org/apache/cmueller/camel/samples/camelone/tx/JmsAndJdbcCompensationTransactionSampleTest.java https://github.com/muellerc/camel-in-transact

Re: Distributed transaction in camel route

2012-09-17 Thread James Carman
Done. On Mon, Sep 17, 2012 at 1:49 PM, Christian Müller wrote: > Add an additional test where the SQLExceptions happens after the second > update. > > Best, > Christian > > On Mon, Sep 17, 2012 at 4:29 AM, James Carman > wrote: > >> Something like this: >> >> >> https://github.com/jwcarman/camel

Re: Distributed transaction in camel route

2012-09-17 Thread Christian Müller
Add an additional test where the SQLExceptions happens after the second update. Best, Christian On Mon, Sep 17, 2012 at 4:29 AM, James Carman wrote: > Something like this: > > > https://github.com/jwcarman/camel-in-transaction/blob/master/src/test/java/org/apache/cmueller/camel/samples/camelone/

Re: Distributed transaction in camel route

2012-09-16 Thread James Carman
Something like this: https://github.com/jwcarman/camel-in-transaction/blob/master/src/test/java/org/apache/cmueller/camel/samples/camelone/quasi/JmsAndJdbcQuasiTransactionSampleTest.java On Sun, Sep 16, 2012 at 12:53 PM, Raul Kripalani wrote: > Hi James, > > By using singular transactions rath

Re: Distributed transaction in camel route

2012-09-16 Thread Christian Müller
Good explanation what I really wanted to say... ;-) Best, Christian On Sun, Sep 16, 2012 at 6:53 PM, Raul Kripalani wrote: > Hi James, > > By using singular transactions rather than distributed transactions (XA), > each resource involved is responsible for managing its own transaction, > i.e. >

Re: Distributed transaction in camel route

2012-09-16 Thread Raul Kripalani
Hi James, By using singular transactions rather than distributed transactions (XA), each resource involved is responsible for managing its own transaction, i.e. the JMS session and the JDBC DataSource will run separate transactions. Camel has a concept called "Unit of Work" that is used to synchr

Re: Distributed transaction in camel route

2012-09-15 Thread James Carman
So, which transaction manager would you give to the jms component? The jms one? Then the db inserts/updates would use the Aries transaction manager? I'll use your example project as a sandbox to play with this setup. Thanks again! On Sep 15, 2012, at 4:54 PM, Christian Müller wrote: > Yo

Re: Distributed transaction in camel route

2012-09-15 Thread Christian Müller
You could use a "normal" JMS transaction to read your JMS message and write the response back into a queue (in the same transaction of course). Make sure your database inserts/updates are committed all together. If your database insert/update fails, the JMS transaction manager will rollback your tr

Re: Distributed transaction in camel route

2012-09-14 Thread James Carman
Christian, Also, what we're looking to do is use non-XA WebSphere MQ connections. So, we need to figure out how to configure this stuff using non-XA JMS, but still have it behave correctly. We are using DBCP's "managed" pool support for the data sources. We believe that's working okay. Thanks,

Re: Distributed transaction in camel route

2012-09-13 Thread James Carman
So, when using Geronimo, why do you set transacted=false on your JMS component, but yet give it a TransactionManager reference? On Thu, Sep 13, 2012 at 6:11 PM, Christian Müller wrote: > May be these examples are useful for you: > https://github.com/muellerc/camel-in-transaction > > Best, > Chri

Re: Distributed transaction in camel route

2012-09-13 Thread Christian Müller
May be these examples are useful for you: https://github.com/muellerc/camel-in-transaction Best, Christian On Thu, Sep 13, 2012 at 4:33 PM, James Carman wrote: > Claus, > > Is there any guidance on how to set up XA correctly? We're having a > really rough time getting Websphere MQ and SQL Serve

Re: Distributed transaction in camel route

2012-09-13 Thread James Carman
Claus, Is there any guidance on how to set up XA correctly? We're having a really rough time getting Websphere MQ and SQL Server connections to work together in an XA fashion. Thanks, james On Thu, Sep 13, 2012 at 10:17 AM, Claus Ibsen wrote: > For that you would need XA when you have 2+ reso

Re: Distributed transaction in camel route

2012-09-13 Thread Claus Ibsen
For that you would need XA when you have 2+ resources participating in the same transaction. It can be tricky to setup. You would need to use the JTA transaction manager from WebSphere etc which supports XA. Make sure the MQ connection factory you refer to is the XA one. On Thu, Sep 13, 2012 at 2