jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paco Avila <pav...@git.es>
Subject Re: about lock tokens
Date Sat, 08 Sep 2007 10:37:03 GMT
El vie, 07-09-2007 a las 17:26 +0200, Dominique Pfister escribió:
> Hi Paco
> 
> On 06/09/2007, Paco Avila <pavila@git.es> wrote:
> > When an user locks a node, a lock token is added to his session. Another
> > user with this lock token added to his session can unlock the node,
> > isn't it?
> 
> Yes, but only if the first session in your example removes the lock
> token, as there can only be one session having that lock token at a
> given time.

Yes, you are right. Another session had the lock token :/

> >
> > But Jackrabbit test also the lock owner (LockManagerImpl.java line 345),
> > but the especification says in 8.4.4 "The lock owner's ID is provided
> > for informational purposes only, it is not tested..."
> 
> In the specified source code section, the "lock holder" is tested, not
> the "lock owner". The lock owner (or lock creator) is the user id of
> the session, that originally locked the node and purely informational.
> The lock holder is the session currently holding the lock token and is
> therefore allowed to change this node (and its descendants if the lock
> is deep).

Sorry, I missunderstood the code because confused "lock holder" and
"lock ownser" concepts :(

The lock (and lockToken) behavior is ok, my code was incorrect.
Sorry! :)
-- 
Paco Avila <pavila@git.es>


Mime
View raw message