[infinispan-issues] [JBoss JIRA] (ISPN-1617) PutForExternalRead doesn't work with transactional caches and autoCommit=false.

Mircea Markus (Resolved) (JIRA) jira-events at lists.jboss.org
Wed Dec 14 11:14:09 EST 2011


     [ https://issues.jboss.org/browse/ISPN-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mircea Markus resolved ISPN-1617.
---------------------------------

    Resolution: Rejected


this will be covered by ISPN-1615
                
> 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 at 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

        


More information about the infinispan-issues mailing list