Examples of holdsLock()


Examples of javax.jcr.lock.LockManager.holdsLock()

     */
    public boolean holdsLock() throws RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = session.getWorkspace().getLockManager();
        return lockMgr.holdsLock(getPath());
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of javax.jcr.lock.LockManager.holdsLock()

     */
    public boolean holdsLock() throws RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = session.getWorkspace().getLockManager();
        return lockMgr.holdsLock(getPath());
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of javax.jcr.lock.LockManager.holdsLock()

        String l2path = null;

        String path = lockedNode.getPath();
        String lockToken = lock.getLockToken();
        assertTrue(lm.isLocked(path));
        assertTrue(lm.holdsLock(path));
        lm.removeLockToken(lockToken);

        Session anotherSession = null;
        try {
            // check lock is seen by new session
View Full Code Here

Examples of javax.jcr.lock.LockManager.holdsLock()

        try {
            // check lock is seen by new session
            anotherSession = getHelper().getSuperuserSession();
            LockManager anotherLockManager = anotherSession.getWorkspace().getLockManager();
            assertTrue(anotherLockManager.isLocked(path));
            assertTrue(anotherLockManager.holdsLock(path));

            // create a second lock
            Node l2node = anotherSession.getNode(path).getParent().addNode("second-lock");
            l2node.addMixin(NodeType.MIX_LOCKABLE);
            anotherSession.save();
View Full Code Here

Examples of javax.jcr.lock.LockManager.holdsLock()

            assertNotNull(l2token);
            anotherSession.save();

            anotherSession.refresh(false);
            assertTrue(anotherLockManager.isLocked(path));
            assertTrue(anotherLockManager.holdsLock(path));

            // try to unlock the lock obtained from the other session
            anotherLockManager.addLockToken(lockToken);
            anotherLockManager.unlock(path);
            anotherSession.save();
View Full Code Here

Examples of javax.jcr.lock.LockManager.holdsLock()

     */
    public boolean holdsLock() throws RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = getSession().getWorkspace().getLockManager();
        return lockMgr.holdsLock(getPath());
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of javax.jcr.lock.LockManager.holdsLock()

     */
    public boolean holdsLock() throws RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = getSession().getWorkspace().getLockManager();
        return lockMgr.holdsLock(getPath());
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of org.apache.jackrabbit.api.jsr283.lock.LockManager.holdsLock()

     */
    public boolean holdsLock() throws RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = ((WorkspaceImpl) session.getWorkspace()).getLockManager();
        return lockMgr.holdsLock(getPath());
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of org.apache.jackrabbit.api.jsr283.lock.LockManager.holdsLock()

     */
    public boolean holdsLock() throws RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = ((WorkspaceImpl) session.getWorkspace()).getLockManager();
        return lockMgr.holdsLock(getPath());
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of org.apache.jackrabbit.core.lock.LockManager.holdsLock()

        checkLockable();

        LockManager lockMgr = session.getLockManager();
        synchronized (lockMgr) {
            if (lockMgr.holdsLock(this)) {
                // save first, and unlock later. this guards concurrent access

                // remove properties in content
                internalSetProperty(QName.JCR_LOCKOWNER, (InternalValue) null);
                internalSetProperty(QName.JCR_LOCKISDEEP, (InternalValue) null);
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.