]
Tristan Tarrant updated ISPN-2865:
----------------------------------
Fix Version/s: 5.2.3.Final
5.3.0.Final
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
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/ma...]
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/ma...]
. 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/ma...].
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: