• Task
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • ehcache-core
  • lorban
  • Reporter: alexsnaps
  • March 23, 2010
  • 0
  • Watchers: 1
  • May 21, 2010
  • April 21, 2010



MNK-1552 showed a flaw in the current implementation in tracking transactionContexts for: a Transaction, or an Xid In my opinion, we should have a single storage for transactionContext. If the Transaction (or the Xid probably) implements hashCode/equals incorrectly, we start behaving randomly… We should probably do a better job at tracking these transactionContext and their states… I certainly would unify these two maps, maybe by introducing a Map<Transaction, Xid> or something…


Fiona OShea 2010-03-23

When do you think we should do this? (not required to do for 2.0.1, but want answer in this timeframe)

Alexander Snaps 2010-03-23

I’d include this in the Ehcache JTA stand-alone timeframe. I certainly would want to avoid building on that fragile impl. for too long in the near future, as this currently blurs the path to real issues (as this monkey) and we will manage to get these two data structures out of sync soon or later …

Ludovic Orban 2010-04-14

Alex’s proposed patch, seems to work fine except with Atomikos within which it triggers a bug:

java.lang.NullPointerException at com.atomikos.icatch.jta.TransactionImp.enlistResource(TransactionImp.java:428) at net.sf.ehcache.transaction.xa.EhcacheXAResourceImpl.createTransactionContext(EhcacheXAResourceImpl.java:471) at net.sf.ehcache.store.XATransactionalStore.getOrCreateTransactionContext(XATransactionalStore.java:462) at net.sf.ehcache.store.XATransactionalStore.get(XATransactionalStore.java:125) at net.sf.ehcache.Cache.searchInStoreWithStats(Cache.java:1678) at net.sf.ehcache.Cache.get(Cache.java:1356) at net.sf.ehcache.Cache.get(Cache.java:1328) at org.terracotta.ehcache.tests.TwoResourceSuspendResumeClient.test(TwoResourceSuspendResumeClient.java:47) at org.terracotta.ehcache.tests.ClientBase.run(ClientBase.java:26) at org.terracotta.ehcache.tests.TwoResourceSuspendResumeClient.main(TwoResourceSuspendResumeClient.java:205)

(test is TwoResourceSuspendResumeAtomikosXATest of terracotta-ehcache/system-tests)

Ludovic Orban 2010-04-19

This is Atomikos bug #63145 which has been fixed and should be included in the next 3.6.x release.

We will postpone committing this change until after Atomikos releases a new version containing this fix. Hopefully this will happen before our final release.

Ludovic Orban 2010-04-21

Patch has been applied to ehcache-core trunk.

The system tests have been updated to use Atomikos 3.6.5 which does solve the problem.

Himadri Singh 2010-05-10

tests are running on monkeys