jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugeny N Dzhurinsky <eugeny...@jdevelop.com>
Subject Re: Multithreading/Mutliuser(?) access
Date Thu, 20 Oct 2005 14:09:37 GMT
On Thu, Oct 20, 2005 at 03:54:31PM +0200, Marcel Reutegger wrote:
> If I'm not totally mistaken your test creates multiple repository 
> instances with the same configuration thus running on the same location. 
> this is not allowed and should actually result in an error when 
> initializing a repository that works on data that is already access by 
> another instance.
> please make sure there is only one repository instance running.

okay, I got you. 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.
     [java] javax.jcr.InvalidItemStateException: db5e6d2d-6a07-49ac-a2b0-9cfe40d1e9a9/{}test:
t
he item cannot be saved because it has been modified externally.
     [java]     at org.apache.jackrabbit.core.ItemImpl.getTransientStates(ItemImpl.java:391)
     [java]     at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1215)
     [java]     at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:765)
     [java]     at JCRTest.releaseSession(JCRTest.java:226)
     [java]     at JCRTest$SingleSessionAccessThread.run(JCRTest.java:368)

the same exception is thrown with LocalFS when session.save() method in releaseSession() is
called.

-- 
Eugene N Dzhurinsky

Mime
View raw message