Examples of removeLockToken()


Examples of javax.jcr.Session.removeLockToken()

        DavSession ds = request.getDavSession();
        if (ds != null && ds instanceof DavSessionImpl) {
            Session repSession = ((DavSessionImpl)ds).getRepositorySession();
            String[] lockTokens = repSession.getLockTokens();
            for (int i = 0; i < lockTokens.length; i++) {
                repSession.removeLockToken(lockTokens[i]);
            }
            sesProvider.releaseSession(repSession);
            log.debug("Releasing session '"+ ds + "' from request '" + request + "'");
        } else {
            // session is null. nothing to be done.
View Full Code Here

Examples of javax.jcr.Session.removeLockToken()

                            path, userId);
                        node.unlock();
                    } else {
                        log.warn("Dropping lock token of permanent lock on {} held by {}",
                            path, userId);
                        session.removeLockToken(lock.getLockToken());
                    }
                } catch (RepositoryException re) {
                    log.debug("Ignoring lock on {} held by {}, not held by this session",
                            path, userId);
                }
View Full Code Here

Examples of javax.jcr.Session.removeLockToken()

            if (lockTokens != null && lockTokens.length > 0) {
                log.warn("Session still has lock tokens !");
                for (int i=0; i < lockTokens.length; i++) {
                    log.warn("Dropping lock token {} held by {}",
                        lockTokens[i], userId);
                    session.removeLockToken(lockTokens[i]);
                }
            }
        } catch (RepositoryException re) {
            if ( log.isDebugEnabled() ) {
                log.debug("Cannot cleanup lockes of session " + userId + ", logging out", re);
View Full Code Here

Examples of javax.jcr.Session.removeLockToken()

    public void releaseSession(WebdavRequest request) {
        DavSession ds = request.getDavSession();
        if (ds != null && ds instanceof DavSessionImpl) {
            Session repSession = ((DavSessionImpl)ds).getRepositorySession();
            for (String lockToken : repSession.getLockTokens()) {
                repSession.removeLockToken(lockToken);
            }
            sesProvider.releaseSession(repSession);
            log.debug("Releasing session '"+ ds + "' from request '" + request + "'");
        } else {
            // session is null. nothing to be done.
View Full Code Here

Examples of javax.jcr.Session.removeLockToken()

            // assert: user must get non-null token
            assertNotNull("user must get non-null token", lock.getLockToken());

            // transfer to standard session
            String lockToken = lock.getLockToken();
            otherSuperuser.removeLockToken(lockToken);
            superuser.addLockToken(lockToken);

            // assert: user must get null token
            assertNull("user must get null token", lock.getLockToken());
View Full Code Here

Examples of javax.jcr.Session.removeLockToken()

            // lock node
            Lock lock = n2.lock(false, false);

            // transfer to standard session
            String lockToken = lock.getLockToken();
            otherSuperuser.removeLockToken(lockToken);
            superuser.addLockToken(lockToken);
        } finally {
            // log out
            otherSuperuser.logout();
        }
View Full Code Here

Examples of javax.jcr.Session.removeLockToken()

        if (log.isDebugEnabled()) {
            log.debug("Removing lock token " + token
                    + " from the current session.");
        }
        Session s = CommandHelper.getSession(ctx);
        s.removeLockToken(token);
        return false;
    }

    /**
     * @return the token key
View Full Code Here

Examples of javax.jcr.Session.removeLockToken()

            // assert: user must get non-null token
            assertNotNull("user must get non-null token", lock.getLockToken());

            // transfer to standard session
            String lockToken = lock.getLockToken();
            otherSuperuser.removeLockToken(lockToken);
            superuser.addLockToken(lockToken);

            // assert: user must get null token
            assertNull("user must get null token", lock.getLockToken());
View Full Code Here

Examples of javax.jcr.Session.removeLockToken()

            // lock node
            Lock lock = n2.lock(false, false);

            // transfer to standard session
            String lockToken = lock.getLockToken();
            otherSuperuser.removeLockToken(lockToken);
            superuser.addLockToken(lockToken);
        } finally {
            // log out
            otherSuperuser.logout();
        }
View Full Code Here

Examples of javax.jcr.Session.removeLockToken()

                                path, userId);
                            node.unlock();
                        } else {
                            log.warn("Dropping lock token of permanent lock on {} held by {}",
                                path, userId);
                            session.removeLockToken(lock.getLockToken());
                        }
                    } catch (RepositoryException re) {
                        log.debug("Ignoring lock on {} held by {}, not held by this session",
                                path, userId);
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.