throws UnsupportedRepositoryOperationException, LockException,
AccessDeniedException, InvalidItemStateException,
RepositoryException {
// check state of this instance
sanityCheck();
LockManager lockMgr = session.getWorkspace().getLockManager();
return lockMgr.lock(getPath(), isDeep, isSessionScoped, Long.MAX_VALUE, null);
}