You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Lei Zhou <Le...@pointalliance.com> on 2009/05/22 18:07:25 UTC

Jackrabbit 1.4.9 - Multiple transactions over single session?

Hi, 
I'm getting intermittent StaleItemStateException when updating a 
collection of nodes repeatedly. The first run of the use case never fails. 
But second or third run would fail on same set of data. 
Wonder how JR handles such use cases and what needs to be paid attention 
to? 
The exception output below: 

Caused by: org.apache.jackrabbit.core.state.StaleItemStateException: 
14229e16-a57c-42f3-91ba-a307c1b60ec9/{}DocumentReferences has been 
modified externally
                 at 
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:620)
                 at 
org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:825)
                 at 
org.apache.jackrabbit.core.state.XAItemStateManager.prepare(XAItemStateManager.java:144)

My use case is as below: 

Begin Transaction(xid1)
   check out nodes
Commit Transaction(xid1)

Begin Transaction(xid2)
   update nodes/delete nodes
Commit Transaction(xid2)

Begin Transaction(xid3)
   check in nodes if exist
Commit Transaction(xid3)


Thanks.



Disclaimer: This message is intended only for the use of the individual or entity to which it is addressed and may contain information which is privileged, confidential, proprietary, or exempt from disclosure under applicable law. 

If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, you are strictly prohibited from disclosing, distributing, copying, or in any way using this message. If you have received this communication in error, please notify the sender and destroy and delete any copies you may have received.