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 Fri, 21 Oct 2005 09:26:36 GMT
On Thu, Oct 20, 2005 at 05:27:51PM +0200, Marcel Reutegger wrote:
> 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.

Okay, I understood this point. However, I found node should be set with
nodetype mix:lockable (?) to allow locks fo changes. But if I change node type
from nt:unstructured to mix:lockable, I'm getting exceptions:
javax.jcr.nodetype.ConstraintViolati
onException: no definition found in parent node's node type for new node: no
matching child node definition found for {}node1_1: no matching child node 
definition found for{}node1_1
     [java] javax.jcr.nodetype.ConstraintViolationException: no definition
     found in parent node's node type for new node: no matching child node 
     definition found for{}node1_1: no matching child node definition found 
     for {}node1_1

Source code attached.

-- 
Eugene N Dzhurinsky

Mime
View raw message