-
1. Re: Local Transactions on the Resource Adapter
timfox Jun 15, 2010 4:25 AM (in response to clebert.suconic)That stuff shouldn't be necessary, even though we still support local transactions.
It's the app server that decides to use local transactions or not, by calling getLocalTransaction(), not something that is configured.
-
2. Re: Local Transactions on the Resource Adapter
jmesnil Jun 15, 2010 5:42 AM (in response to clebert.suconic)I think the code for local transaction in the RA is broken in the trunk.
in HornetQRAManagedConnection.setup(), we create a single JMS session through createXASession().getSession().
If the app server then call getLocalTransaction() on the RA, we will in fact use a XA session and it will throw an exception when calling commit() or rollback() on the local tx.
I'm fixing this to create either a XASession (if the connection request info says to use XA) or a regular transacted session.
Then, in getSession(), I can either return xaSession.getSession() (if xaSession has been created) or the transacted session.
I'm adding the patch. Could someone have a look to double check while I am testing it?
-
localtx.diff.zip 2.4 KB
-
-
3. Re: Local Transactions on the Resource Adapter
ataylor Jun 15, 2010 5:45 AM (in response to jmesnil)Jeff Mesnil wrote:
I think the code for local transaction in the RA is broken in the trunk.
in HornetQRAManagedConnection.setup(), we create a single JMS session through createXASession().getSession().
If the app server then call getLocalTransaction() on the RA, we will in fact use a XA session and it will throw an exception when calling commit() or rollback() on the local tx.
I'm fixing this to create either a XASession (if the connection request info says to use XA) or a regular transacted session.
Then, in getSession(), I can either return xaSession.getSession() (if xaSession has been created) or the transacted session.
I'm adding the patch. Could someone have a look to double check while I am testing it?
will do
-
4. Re: Local Transactions on the Resource Adapter
timfox Jun 15, 2010 5:46 AM (in response to jmesnil)Can you make sure there are tests for this too?