• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • nrana
  • Reporter: nelrahma
  • February 19, 2010
  • 0
  • Watchers: 1
  • April 07, 2010
  • March 19, 2010

Description

Currently we cannot support interleaving transactions for the Atomikos TM. This means:

Transaction tx = txnManager.suspend();

txnManager.resume() does not work.

this is due to the combination of Atomikos not calling XAResource.end() upon suspend() and not properly implementing hashcode() for their transaction class.

Comments

Nabib El-Rahman 2010-02-19

Already posted issues to Atomikos forum. There bug tracking software is not available to those without developer support.

Nabib El-Rahman 2010-02-19

http://fogbugz.atomikos.com/default.asp?community.6.1270.0 http://fogbugz.atomikos.com/default.asp?community.6.1271.0

Fiona OShea 2010-02-19

Assigning to myself to doc as known issue in Release Notes

Fiona OShea 2010-02-19

Assigning back to Nabib to update whenever there is a response from Atomikos

Nabib El-Rahman 2010-02-24

Email correspondence so far:

Hello guy,

Thank you for your quick response! and the hashcode() fix. As for the second issue, I’m not saying that I want to delist the reasource(), simply asking if it is possible to call XAResource.end() when suspend() is called.

Consider the following scenario:

txnManager.begin() txnManager.suspend() txnmanager.begin()

Unless I enlist the resource repeated on every transaction operation (i.e cache operations for me) I won’t know if suspend was ever call. It just makes is way more easier for the XAResource implementor side.

What i was imagining is something like this:

txnManager.begin() … some cache operation -> check thread local for running xid, doesn’t exist -> enlist -> which calls XaResource.start()

txnManager.suspend() -> call XaResouce.end() -> remove xid from thread local

txnManager.begin() … some cache operation -> check thread local for running xid, doesn’t exist -> enlist -> which calls XaResource.start()

Thanks!

-Nabib

On 02/23/2010 12:01 AM, [email protected] wrote:

Hi Nabib,

The hashCode problem has been fixed in our 3.6.2 release - online as from now.

Regarding the suspend/delist question of yours: the JTA spec is clear about this: if you enlist/delist via the JTA/XA API yourself then our JTA should _not_ delist anything if you suspend the transaction. Doing so would be agains the specs.

In other words, you then have to delist yourself then. If you use our pooled connection then these will do the delist for you, but the JTA/XA API is different (and low-level).

Best Guy


This message was sent on behalf of [email protected] in response to your discussion group message. Your email address has not been revealed to the sender.

Your message: http://fogbugz.atomikos.com/default.asp?community.6.1270.1

Nabib El-Rahman 2010-02-26

I still didn’t hear back from these guys.. Is it safe to say they disagree? If that’s so, we current don’t support suspend()/resume() for Atomikos. The hashcode() fix may help us come up with a solution.

Ludovic Orban 2010-03-03

Isn’t this issue related to DEV-3885 ? Once again I’d like to better understand why you need the EhCache XAResource to be notified when a transaction suspension occurs.

Ludovic Orban 2010-03-17

This is solved by EHC-649 but the test suite described in DEV-3887 is still missing to prove it.

Ludovic Orban 2010-03-19

This has been solved by EHC-649.

Ludovic Orban 2010-03-19

These two tests already existed in terracotta-ehcache but were disabled because they were broken: SuspendResumeAtomikosXATest and TwoResource SuspendResumeAtomikosXATest

I’ve re-actived them as they now work.

Nitin Rana 2010-04-07

System tests are passing now,