-
Bug
-
Resolution: Won't Do
-
Major
-
2.2.1.GA
The node that holds the lock can be deleted. No Exception is thrown even though the mixin=mix:lockable with a deep lock is present on the node.
CODE:
// Use the JPA connector (it's the same for the inmem connector).
Session session1 = RepositoryReferenceFactory.getRepository("test-jpa").login();
Session session2 = RepositoryReferenceFactory.getRepository("test-jpa").login();
LockManager lm1 = session1.getWorkspace().getLockManager();
// Create dir structure
Node root1 = session1.getRootNode();
Node node1 = root1.addNode("node1", "nt:folder");
Node node2 = root1.addNode("node1/node2", "nt:folder");
Node node3 = root1.addNode("node1/node2/node3", "nt:folder");
session1.save();
// Lock the second node
node2.addMixin("mix:lockable");
session1.save();
lm1.lock("/node1/node2", true, false, 10000, "Locked");
session1.save();
// Attempt to delete the locked node
session2.refresh(true);
Node toDelete = session2.getNode("/node1/node2");
toDelete.remove();
session2.save();
- relates to
-
MODE-1040 An attempt to delete a child node of a node which holds an open-scoped shallow lock results in a LockException.
- Closed