Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.UserTransactionImpl.commit()


        n2.setProperty(propertyName1, "testSetProperty");
        s.save()// -> used to fail because PropertyImpl#getParent called from PropertyImpl#checkSetValue
                   //    was checking read permission on the not yet commited parent

        // commit
        utx.commit();
    }

    private static Node findPolicyNode(Node start) throws RepositoryException {
        Node policyNode = null;
        if (start.isNodeType("rep:Policy")) {
View Full Code Here


        n2.setProperty(propertyName1, "testSetProperty");
        s.save()// -> used to fail because PropertyImpl#getParent called from PropertyImpl#checkSetValue
                   //    was checking read permission on the not yet commited parent

        // commit
        utx.commit();
    }

    private static Node findPolicyNode(Node start) throws RepositoryException {
        Node policyNode = null;
        if (start.isNodeType("rep:Policy")) {
View Full Code Here

                        Lock lock = n.lock(false, true);

                        final UserTransaction utx = new UserTransactionImpl(test.getSession());
                        utx.begin();
                        lock.refresh();
                        utx.commit();

                        n.unlock();
                    }
                } catch (Exception e) {
                    final String threadName = Thread.currentThread().getName();
View Full Code Here

                        Node n = test.addNode("test" + i);
                        n.addMixin(mixLockable);
                        session.save();
                        Lock l = n.lock(false, true);
                        n.unlock();
                        utx.commit();
                    } catch (Exception e) {
                        final String threadName = Thread.currentThread().getName();
                        final Throwable deepCause = getLevel2Cause(e);
                        if (deepCause != null && deepCause instanceof StaleItemStateException) {
                            // ignore
View Full Code Here

        n2.setProperty(propertyName1, "testSetProperty");
        s.save()// -> used to fail because PropertyImpl#getParent called from PropertyImpl#checkSetValue
                   //    was checking read permission on the not yet commited parent

        // commit
        utx.commit();
    }

    private static Node findPolicyNode(Node start) throws RepositoryException {
        Node policyNode = null;
        if (start.isNodeType("rep:Policy")) {
View Full Code Here

        // create two versions
        String v1 = n.checkin().getName();
        n.checkout();
        n.checkin();
        n.checkout();
        tx.commit();

        tx = new UserTransactionImpl(superuser);
        tx.begin();
        // remove one version
        n = superuser.getNodeByUUID(uuid);
View Full Code Here

        tx.begin();
        // remove one version
        n = superuser.getNodeByUUID(uuid);
        n.getVersionHistory().removeVersion(v1);
        n.save();
        tx.commit();

        // new session
        Session session = getHelper().getSuperuserSession();
        tx = new UserTransactionImpl(session);
        tx.begin();
View Full Code Here

        Session session = getHelper().getSuperuserSession();
        tx = new UserTransactionImpl(session);
        tx.begin();
        n = session.getNodeByUUID(uuid);
        n.checkin();
        tx.commit();
    }

    /**
     * Removes a version in 1 transaction and tries to commit afterwards the
     * versionable node using a 2nd transaction. Uses the JCR2.0 API.
View Full Code Here

        // create two versions
        String path = n.getPath();
        String v1 = superuser.getWorkspace().getVersionManager().checkpoint(path).getName();
        String v2 = superuser.getWorkspace().getVersionManager().checkpoint(path).getName();
        tx.commit();

        tx = new UserTransactionImpl(superuser);
        tx.begin();
        // remove one version
        superuser.getWorkspace().getVersionManager().getVersionHistory(path).removeVersion(v1);
View Full Code Here

        tx = new UserTransactionImpl(superuser);
        tx.begin();
        // remove one version
        superuser.getWorkspace().getVersionManager().getVersionHistory(path).removeVersion(v1);
        tx.commit();

        // new session
        Session session = getHelper().getSuperuserSession();
        tx = new UserTransactionImpl(session);
        tx.begin();
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.