[infinispan-issues] [JBoss JIRA] (ISPN-3077) cache.lock should work within the scope of batching

Sanne Grinovero (JIRA) jira-events at lists.jboss.org
Thu May 9 09:28:54 EDT 2013


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

Sanne Grinovero updated ISPN-3077:
----------------------------------

        Status: Resolved  (was: Pull Request Sent)
    Resolution: Done

    
> cache.lock should work within the scope of batching
> ---------------------------------------------------
>
>                 Key: ISPN-3077
>                 URL: https://issues.jboss.org/browse/ISPN-3077
>             Project: Infinispan
>          Issue Type: Bug
>    Affects Versions: 5.2.6.Final
>            Reporter: Mircea Markus
>            Assignee: Mircea Markus
>             Fix For: 5.3.0.Beta2, 5.3.0.Final
>
>
> {code:java}
> cache.getAdvancedCache().startBatch();
> cache.lock("k");
> ...
> cache.endBatch(..);
> {code}
> The code above throws an exception:
> {quote}
> java.lang.IllegalArgumentException: Cannot create a transactional context without a valid Transaction instance.
> 	at org.infinispan.context.TransactionalInvocationContextContainer.createInvocationContext(TransactionalInvocationContextContainer.java:113)
> 	at org.infinispan.context.TransactionalInvocationContextContainer.createInvocationContext(TransactionalInvocationContextContainer.java:108)
> 	at org.infinispan.CacheImpl.getInvocationContextForWrite(CacheImpl.java:471)
> 	at org.infinispan.CacheImpl.lock(CacheImpl.java:568)
> 	at org.infinispan.CacheImpl.lock(CacheImpl.java:553)
> 	at org.infinispan.api.batch.LockInBatchTest.testLockWithBatching(LockInBatchTest.java:47)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
> 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
> 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
> 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
> 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> 	at org.testng.TestRunner.privateRun(TestRunner.java:767)
> 	at org.testng.TestRunner.run(TestRunner.java:617)
> 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> 	at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
> 	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
> 	at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:680)
> {quote}
> This logic should be supported, as batching is a convenient way for using transactions without the burden of configuring a transaction manager. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list