Hi all,
While testing an application with JackRabbit we've noticed that locking a
node does not prevent it from being deleted or moved. Is this intentional?
The use case is given a node hierarchy:
A
--B
--C1
--C2
1) Login as two separate users, X and Y
2) User X locks C1
3) User Y attempts to delete B as follows...
B.remove()
A.save()
then the node will be deleted despite User X having a lock
4) If User Y attempts to delete B as follows then a LockException will be
thrown...
// locking with deep flag set to true which attempts to lock the whole
subtree
B.lock(true, false) // throws exception so following lines not
executed...
B.remove()
A.save()
5) All of the above applies whether the delete/move is attempted on the
locked node itself or an ancestor.
This is slightly surprising and has some worrying implications for
multi-user applications. All comments welcome.
Regards,
Shaun.