jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Damioli <cedric.dami...@anyware-tech.com>
Subject Lock removed when shutdown/restart of the Repository ?
Date Fri, 17 Jun 2005 10:28:36 GMT

I encountered a strange problem (using jackrabbit from yesterday) :
I locked a Node, Node.isLocked() returns true, then shutdown/restart of 
my Servlet app (implying shutdown/restart of the Respository itself) and 
then, Node.isLocked() returns... false !!
Is the locked state of a Node not yet persisted ?
Or am I missing something important ?

The second point is when using a Lock which is not session scoped, I 
can't unlock it with another Session, even when adding the LockToken.
My code is equivalent to the following :


lt = node.getLock().getLockToken();

s1 = node.getSession();


s2 = repo.login();


node2 = s2.getItem(...);

node2.unlock() -> LockException("Node not locked by session");

Actually, the s1.logout() does not remove the LockToken from s1. And the 
LockInfo still references s1.
So when s2 tries to addLockToken, the LockManagerImpl.lockTokenAdded() 
does not the job saying "lock already held by other session".
If before logging out from s1, I do s1.removeLockToken(s1), all works 

Is it an expected behaviour ?

I hope to have been quite clear :-)

Does someone have a pointer in the code, so that I can take a look inside ?


Cédric Damioli
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46

View raw message