Package javax.jcr

Examples of javax.jcr.Node.unlock()


            } catch (LockException e) {
                // success
            }

            // unlock to remove node at tearDown()
            node2.unlock();
        } finally {
            session2.logout();
        }
    }
View Full Code Here


                        "locked node");
            } catch (LockException e) {
                // success
            }

            node2.unlock();
        } finally {
            session2.logout();
        }
    }
View Full Code Here

            } catch (LockException e) {
                // success
            }

            // unlock to remove node at tearDown()
            node2.unlock();
        } finally {
            session2.logout();
        }
    }
View Full Code Here

            } catch (LockException e) {
                // success
            }

            // unlock to remove node at tearDown()
            node2.unlock();
        } finally {
            session2.logout();
        }
    }
View Full Code Here

        try {
            // creating a shallow lock on the parent must succeed.
            parent.lock(false, true);
        } finally {
            parent.unlock();
        }
        try {
            // creating a shallow lock on the parent must succeed.
            lockMgr.lock(parent.getPath(), false, true, getTimeoutHint(), getLockOwner());
        } finally {
View Full Code Here

        }
        try {
            // creating a shallow lock on the parent must succeed.
            lockMgr.lock(parent.getPath(), false, true, getTimeoutHint(), getLockOwner());
        } finally {
            parent.unlock();
        }
    }

    public void testRemoveLockedChild() throws RepositoryException {
        Session otherSession = helper.getReadWriteSession();
View Full Code Here

            fail("Query.storeAsNode() must throw LockException, parent node is locked.");
        } catch (LockException e) {
            // expected behaviour
        } finally {
            readWrite.logout();
            lockable.unlock();
        }
    }

    /**
     * Tests if the a {@link javax.jcr.RepositoryException} is thrown when
View Full Code Here

        String lockOwnerPath = testRoot + "/" + nodeName1 + "/" + jcrLockOwner;
        assertTrue("No event created for jcr:lockOwner", paths.contains(lockOwnerPath));
        String lockIsDeepPath = testRoot + "/" + nodeName1 + "/" + jcrlockIsDeep;
        assertTrue("No event created for jcr:lockIsDeep", paths.contains(lockIsDeepPath));

        lockable.unlock();
    }

    /**
     * Tests if unlocking a node triggers property removed events for the
     * properties jcr:lockOwner and jcr:lockIsDeep.
View Full Code Here

        // lock the node
        lockable.lock(false, true);

        EventResult result = new EventResult(log);
        addEventListener(result, Event.PROPERTY_REMOVED);
        lockable.unlock();

        Event[] events = result.getEvents(DEFAULT_WAIT_TIMEOUT);
        removeEventListener(result);
        assertEquals("Wrong number of events.", 2, events.length);
        for (int i = 0; i < events.length; i++) {
View Full Code Here

                        synchronized ( this.deletedJobs ) {
                            this.deletedJobs.add(eventNodePath);
                        }
                        // unlock node
                        try {
                            eventNode.unlock();
                        } catch (RepositoryException e) {
                            // if unlock fails, we silently ignore this
                            this.ignoreException(e);
                        }
                        unlock = false;
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.