[
https://issues.jboss.org/browse/ISPN-1617?page=com.atlassian.jira.plugin....
]
Galder Zamarreño commented on ISPN-1617:
----------------------------------------
Mircea, this can be solved with ISPN-1615 which is likely to be more performant than
starting a new tx.
PutForExternalRead doesn't work with transactional caches and
autoCommit=false.
-------------------------------------------------------------------------------
Key: ISPN-1617
URL:
https://issues.jboss.org/browse/ISPN-1617
Project: Infinispan
Issue Type: Bug
Components: Transactions
Affects Versions: 5.1.0.CR1
Reporter: Mircea Markus
Assignee: Mircea Markus
Fix For: 5.1.0.FINAL
putForExternalRead(PFER) suspends the transaction before invoking the underlaying put,
which throws a ISException as the call is not performed in a transactional context.
Here is the unit test:
{code}
/**
* @author Mircea Markus <mircea.markus(a)jboss.com> (C) 2011 Red Hat Inc.
* @since 5.1
*/
@Test (groups = "functional", testName =
"tx.NoAutoCommitAndPferTest")
public class NoAutoCommitAndPferTest extends SingleCacheManagerTest {
@Override
protected EmbeddedCacheManager createCacheManager() throws Exception {
Configuration dsc = getDefaultStandaloneConfig(true);
dsc.fluent().transaction().autoCommit(false);
return new DefaultCacheManager(dsc);
}
public void testPferNoAutoCommitExplicitTransaction() throws Exception {
tm().begin();
cache.putForExternalRead("k","v");
tm().commit();
assert cache.get("k").equals("v"); //here is the failure!
}
public void testPferNoAutoCommit() throws Exception {
cache.putForExternalRead("k","v");
assert cache.get("k").equals("v"); //here is the failure!
}
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira