* @throws ConfigurationException if the configuration is broken
*/
protected RepositoryLockMechanismFactory getRepositoryLockMechanismFactory(final Element root) {
return new RepositoryLockMechanismFactory() {
public RepositoryLockMechanism getRepositoryLockMechanism() throws RepositoryException {
RepositoryLockMechanism lock = null;
NodeList children = root.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE
&& REPOSITORY_LOCK_MECHANISM_ELEMENT.equals(child.getNodeName())) {