-
Bug
-
Resolution: Done
-
Critical
-
5.0.0.BETA1, 5.0.0.BETA2
-
None
It seems that there is a regression since ISPN 5.0.0, the method isSameRM returns true even for 2 different cache instances which has for side effect to make ISPN forget to commit the changes on the second cache and more important to release the locks that have been acquired during the Tx.
The following code fails on ISPN 5.0.0 but passes on ISPN 4.2.1.FINAL (with a real TM like Arjuna)
public void testUpdate() throws Exception { Cache<String, String> cache1 = manager.getCache("cache1"); Cache<String, String> cache2 = manager.getCache("cache2"); assertFalse(cache1.containsKey("a")); assertFalse(cache2.containsKey("b")); TransactionManager tm = cache1.getAdvancedCache().getTransactionManager(); tm.begin(); cache1.put("a", "value1"); cache2.put("b", "value2"); tm.commit(); assertEquals("value1", cache1.get("a")); assertEquals("value2", cache2.get("b")); tm.begin(); cache1.remove("a"); cache2.remove("b"); tm.commit(); assertFalse(cache1.containsKey("a")); assertFalse(cache2.containsKey("b")); }
Find as attached file the full unit test