jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Pfister <dominique.pfis...@day.com>
Subject Re: Lock removed when shutdown/restart of the Repository ?
Date Fri, 17 Jun 2005 12:22:37 GMT
Hi Cédric,

Thank you for reporting these locking issues that I was perfectly able 
to reproduce. I opened an entry in the JIRA bug tracking system:

http://issues.apache.org/jira/browse/JCR-137

and I hope to have them fixed soon.

Cheers
Dominique Pfister

Cédric Damioli wrote:
> Hi,
> 
> 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 :
> 
> node.lock();
> 
> lt = node.getLock().getLockToken();
> 
> s1 = node.getSession();
> 
> s1.logout();
> 
> s2 = repo.login();
> 
> s2.addLockToken(lt);
> 
> 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 
> correctly.
> 
> 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 ?
> 
> Regards,
> Ced
> 


Mime
View raw message