jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Multithreading/Mutliuser(?) access
Date Thu, 20 Oct 2005 15:27:51 GMT
Hi Eugeny,

Eugeny N Dzhurinsky wrote:
> Right now there is some other errors. I modified
> createSession to operate only on single repository (private static Repository
> repo). When several threads are working within single session, everything
> seems to be ok, but with several sessions there are a lot of exceptions about 
>  [java] ERROR 20/03/05 05:03:04 [30] (JCRTest$SingleSessionAccessThread:370) - javax.jcr.In
> validItemStateException: db5e6d2d-6a07-49ac-a2b0-9cfe40d1e9a9/{}test: the item cannot
be saved 
> because it has been modified externally.

Because of JCRs data model this can potentially happen to any save() 
call, unless the modification is protected with a lock.

when one session modifies a node and tries to save it, another session 
might have been faster and the changes of the latter session win. the 
first session then gets an InvalidItemStateException because it tried to 
save inconsistent data.


View raw message