Package javax.jcr.lock

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


     */
    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

     */
    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

     */
    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

        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

        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

            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

     */
    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

     */
    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

     */
    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

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.