Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.2
-
None
Description
In XA Environment it's possible that two different Threads are used for prepare() and commit()
The ConnectionHelper stores the Connection that is used in the DatabaseJournal on a ThreadLocal on prepare()
On commit() comes a different Thread so the previous used Connection is not on the ThreadLocal
This is the resulting Thread-Dump
java.lang.IllegalStateException: not in batch mode
at org.apache.jackrabbit.core.util.db.ConnectionHelper.endBatch(ConnectionHelper.java:256)
at org.apache.jackrabbit.core.journal.DatabaseJournal.endBatch(DatabaseJournal.java:513)
at org.apache.jackrabbit.core.journal.DatabaseJournal.doUnlock(DatabaseJournal.java:501)
at org.apache.jackrabbit.core.journal.AbstractJournal.unlock(AbstractJournal.java:330)
at org.apache.jackrabbit.core.journal.AppendRecord.update(AppendRecord.java:279)
at org.apache.jackrabbit.core.cluster.ClusterNode$WorkspaceUpdateChannel.updateCommitted(ClusterNode.java:664)
at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:809)
at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:181)
at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:195)
at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:326)
at org.apache.jackrabbit.jca.TransactionBoundXAResource.commit(TransactionBoundXAResource.java:49)
Attachments
Attachments
Issue Links
- relates to
-
JCR-3433 Backport JCR-3349: The BatchMode of the ConnectionHelper doesn't work in XA Environment
- Closed