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 09:41:22 GMT
mix:lockable is a mixin node type, that means you cannot create a node
with this node type directly. you can think of it as an abstract class, 
that you cannot instanciate.

however you can add a mixin to an existing node using Node.addMixin()

please have a look at secion 4.8 of the jcr spec.

regards
  marcel

Eugeny N Dzhurinsky wrote:
> 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
> 

Mime
View raw message