DummyTransactionManager included in the distro is only for testing only. It only supports single thread. If you want to test it out, you will need to plug in a different tm (e.g., running under JBoss AS).
But if anyone volunteers to make the current DummyTransactionManager supporting concurrnecy, please jump in now. :-)
I was under the impression that the DummyTransactionManager supported multiple threads locally. It doesn't seem to support the transaction isolation levels on a cluster-wide basis (ie. all locking is local until commit() is called). My testing (which I admit hasn't been overly extensive) seemed to support this assertion. This is actually fine in my situation, but if it truly doesn't support multiple local threads then that's not so good.
I'm stuck with using the cache in standalone mode (ie. no app server), so does anyone have any suggestions about other possible transaction managers? Otherwise I fear that I might be the one having to update the DummyTransactionManager! :-)
You are right. I had to retract my statement. It does support multiple threads locally since we do have a test case TxConcurrentBankUnitTestCase for this. :-)
In terms of isolation level, there should be no difference though. I mean even if you are using AS tm, the locking behavior across cluster should be the same.
Having said that, it is still recommended only for testing purpose though.
If you use isolation level of SERIALIZABLE, then the behvior you get is incorrect ! Reads and writes should have exclusive locks.
Since we have tested that this works, please submit a short unit test that shows your issue.