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 Fri, 21 Oct 2005 11:42:05 GMT
Eugeny N Dzhurinsky wrote:
> Actually my question is : how can I access the same node from several sessions
> and threads w/o breaking things?

simply use a separate session for each thread that writes to the 
workspace. and you will be fine. keep in mind that jcr operations on a 
read-committed basis talking in database terms. if you required a higher 
isolation level you need to use locks.

> I just need to know caveats before we will
> start implementing our CMS with JackRabbit. I wrote test application which
> emulates concurrent access to the same node, and all what I'm getting now -
> just set of exceptions, which identifies I should take care of synchronising
> between sessions by myself, but I don't see any way to do that w/o
> hacking/modifying JackRabbit code, am I correct?

that's definitively something you shouldn't do, though we are always 
happy to accept patches that improve jackrabbit. but in this case the 
exceptions you see are because the jcr specification says so.

again, use locks if you want to be sure that no other session modifies 
nodes that you are trying to commit. otherwise be prepared that a save() 
might fail.

regards
  marcel

Mime
View raw message