[infinispan-issues] [JBoss JIRA] Updated: (ISPN-1062) Cannot enroll 2 cache instances in the same global Tx
Manik Surtani (JIRA)
jira-events at lists.jboss.org
Wed Apr 20 07:00:33 EDT 2011
[ https://issues.jboss.org/browse/ISPN-1062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Manik Surtani updated ISPN-1062:
--------------------------------
Assignee: Mircea Markus (was: Manik Surtani)
Fix Version/s: 5.0.0.CR1
> Cannot enroll 2 cache instances in the same global Tx
> -----------------------------------------------------
>
> Key: ISPN-1062
> URL: https://issues.jboss.org/browse/ISPN-1062
> Project: Infinispan
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 5.0.0.BETA1, 5.0.0.BETA2
> Reporter: Nicolas Filotto
> Assignee: Mircea Markus
> Priority: Critical
> Fix For: 5.0.0.CR1
>
> Attachments: TestMultiCacheInstances.java
>
>
> 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)
> {code:java}
> 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"));
> }
> {code}
> Find as attached file the full unit test
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list