Package org.apache.jackrabbit.core

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


        addEventListener(listener, Event.NODE_ADDED);

        // use a transaction
        UserTransaction utx = new UserTransactionImpl(superuser);
        // start transaction
        utx.begin();
        Version v = n1.checkin();
        // commit transaction
        utx.commit();

        removeEventListener(listener);
View Full Code Here


        addEventListener(listener, Event.NODE_REMOVED);

        // use a transaction
        UserTransaction utx = new UserTransactionImpl(superuser);
        // start transaction
        utx.begin();
        v.getContainingHistory().removeVersion(v.getName());
        // commit transaction
        utx.commit();

        removeEventListener(listener);
View Full Code Here

        givePrivileges(path, privileges, getRestrictions(superuser, path));

        // create new node and lock it
        Session s = getTestSession();
        UserTransaction utx = new UserTransactionImpl(s);
        utx.begin();

        // add node and save it
        Node n = s.getNode(childNPath);
        if (n.hasNode(nodeName1)) {
            Node c = n.getNode(nodeName1);
View Full Code Here

public class RemoveAndCheckinXATest extends AbstractJCRTest {

    public void testRemoveVersion() throws Exception {
        UserTransaction tx = new UserTransactionImpl(superuser);
        tx.begin();
        Node n = testRootNode.addNode(nodeName1);
        n.addMixin(mixVersionable);
        n.addMixin(mixReferenceable);
        testRootNode.save();
        String uuid = n.getUUID();
View Full Code Here

        n.checkin();
        n.checkout();
        tx.commit();

        tx = new UserTransactionImpl(superuser);
        tx.begin();
        // remove on version
        n = superuser.getNodeByUUID(uuid);
        n.getVersionHistory().removeVersion(v1);
        n.save();
        tx.commit();
View Full Code Here

        // new session
        Session session = helper.getSuperuserSession();
        // for jackrabbit 2.x
        // Session session = getHelper().getSuperuserSession();
        tx = new UserTransactionImpl(session);
        tx.begin();
        n = session.getNodeByUUID(uuid);
        n.checkin();
        tx.commit();
    }
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.