[infinispan-issues] [JBoss JIRA] (ISPN-2865) Error calling clear() via JMX on a transactional cache with autoCommit=false
Mircea Markus (JIRA)
jira-events at lists.jboss.org
Tue Mar 5 08:40:57 EST 2013
[ https://issues.jboss.org/browse/ISPN-2865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mircea Markus updated ISPN-2865:
--------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/infinispan/infinispan/pull/1700
> Error calling clear() via JMX on a transactional cache with autoCommit=false
> ----------------------------------------------------------------------------
>
> Key: ISPN-2865
> URL: https://issues.jboss.org/browse/ISPN-2865
> Project: Infinispan
> Issue Type: Bug
> Components: JMX, reporting and management
> Affects Versions: 5.2.1.Final
> Environment: Apache Tomcat on Linux and Windows
> Reporter: Marc Richards
> Assignee: Mircea Markus
> Labels: 5.2.x
> Fix For: 5.2.3.Final, 5.3.0.Final
>
>
> Calling clear() via JMX (e.g. JConsole) on a transactional cache with autoCommit="false" fails with an IllegalStateException.
> Looking at the source code it would appear that the expectation is that the call to clear() would have been wrapped in a transaction, however that is not currently happening for calls made via JMX if autoCommit="false".
>
> The [clear() method in CacheImpl.java line 321|https://github.com/infinispan/infinispan/blob/5.2.1.Final/core/src/main/java/org/infinispan/CacheImpl.java#L321] calls getInvocationContextWithImplicitTransaction() which tests to see if there is an ongoing transaction [on line 482|https://github.com/infinispan/infinispan/blob/5.2.1.Final/core/src/main/java/org/infinispan/CacheImpl.java#L482] . If autocommit is turned on, it will automatically create an implicit transaction, but if it is off as I had it, it will simply call createInvocationContext() and throw an IllegalStateException when it sees that the transaction is still null in [TransactionalInvocationContextContainer.java on line 112|https://github.com/infinispan/infinispan/blob/5.2.1.Final/core/src/main/java/org/infinispan/context/TransactionalInvocationContextContainer.java#L112].
> I currently work around the issue by setting autoCommit="true", but that is not an ideal solution.
--
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