Iterator<String> iterator = sessionScopedLocks.iterator();
while (iterator.hasNext()) {
NodeDelegate node = delegate.getNode(iterator.next());
if (node != null) {
try {
node.unlock(); // TODO: use a single commit
} catch (RepositoryException e) {
log.warn("Failed to unlock a session scoped lock", e);
}
}
iterator.remove();