jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Sascha.The...@bosch-si.com>
Subject AW: jcr:lockOwner not null but node.isLocked == false
Date Tue, 22 Nov 2011 17:37:47 GMT

> Can you confirm the actual state of the node? Try and lock a node and
see if
> It works or throws an ex.  Also try using the jcr2 methods:

> session.getWorkspace().getLockManager().isLocked(path)
> plus unlock()/lock()

I can now say that the node is not locked in Jackrabbit`s point of view.
Node.isLocked=false and
session.getWorkspace().getLockManager().isLocked(path)=false. It is
possible to lock the node but it is not possible to unlock the node.
Unlocking the node throws a LockException (Node not locked). Locking the
node returns a lock token that we already obtained when the node was
locked for the first time. I can confirm that is exactly the same token
because we store the tokens in a relational database and we get now
exceptions because the lock token already exists in our database. If I
lock the node, everything is fine now. Node.isLocked == true and if I
unlock the node node.isLocked=false and
node.hasProperty("jcr:lockOwner") == false, like I would expect it.

It seems that Jackrabbit has just 'forgotten' what was locked and what
not. In my opinion it must be a bug because the node state
node.getProperty("jcr:lockOwner") != null && node.isLocked==false can`t
be correct.

I cannot reproduce the problem with a complete fresh setup. It seems
that the problem only occurs when upgrading to Jackrabbit 2.2.9 and
using the database from Jackrabbit 1.6.

For me it is very important to know a workaround for the problem. Maybe
I have to re-lock everything where the jcr:lockOwner property is set and
where node.isLocked=false? What do you think? Do you need any other
information? Should I report a bug?

> Also might be interesting if sql2 returns a different set, something
like:
> select * from [my:elementNodeType] AS s WHERE s.[my:att] = 'SomeValue'
AND
> s.[jcr:lockOwner] IS NOT NULL

Didn`t tried that so far but I think the query language makes no
difference because if I obtain such a node via
session.getRootNode().getNode(path) the result is the same
(lockOwner!=null && nodel.isLocked=false) and here I haven`t used any
query language.

Thanks for your help!

Sascha

Mime
View raw message