Package org.apache.jackrabbit.core.version

Examples of org.apache.jackrabbit.core.version.InternalXAVersionManager


        WorkspaceImpl workspace = context.getWorkspace();
        XAItemStateManager stateMgr =
            (XAItemStateManager) workspace.getItemStateManager();
        XALockManager lockMgr =
            (XALockManager) workspace.getInternalLockManager();
        InternalXAVersionManager versionMgr =
            (InternalXAVersionManager) getInternalVersionManager();

        /**
         * Create array that contains all resources that participate in this
         * transactions. Some resources depend on each other, therefore you
         * should only change the sequence if you know what you are doing!
         *
         * There are two artificial resources on the version manager (begin and
         * end), which handle locking of the version manager. The begin resource
         * acquires the write lock on the version manager in its prepare method,
         * while the end resource releases the write lock in either commit or
         * rollback. Please note that the write lock is only acquired if there
         * is something to commit by the version manager.
         * For further information see JCR-335 and JCR-962.
         */
        txResources = new InternalXAResource[] {
            versionMgr.getXAResourceBegin(),
            versionMgr, stateMgr, lockMgr,
            versionMgr.getXAResourceEnd()
        };
        stateMgr.setVirtualProvider(versionMgr);
    }
View Full Code Here


     * {@inheritDoc}
     */
    @Override
    protected InternalVersionManager createVersionManager()
            throws RepositoryException {
        return new InternalXAVersionManager(
                repositoryContext.getInternalVersionManager(),
                repositoryContext.getNodeTypeRegistry(),
                this,
                repositoryContext.getItemStateCacheFactory());
    }
View Full Code Here

        WorkspaceImpl workspace = context.getWorkspace();
        XAItemStateManager stateMgr =
            (XAItemStateManager) workspace.getItemStateManager();
        XALockManager lockMgr =
            (XALockManager) workspace.getInternalLockManager();
        InternalXAVersionManager versionMgr =
            (InternalXAVersionManager) getInternalVersionManager();

        /**
         * Create array that contains all resources that participate in this
         * transactions. Some resources depend on each other, therefore you
         * should only change the sequence if you know what you are doing!
         *
         * There are two artificial resources on the version manager (begin and
         * end), which handle locking of the version manager. The begin resource
         * acquires the write lock on the version manager in its prepare method,
         * while the end resource releases the write lock in either commit or
         * rollback. Please note that the write lock is only acquired if there
         * is something to commit by the version manager.
         * For further information see JCR-335 and JCR-962.
         */
        txResources = new InternalXAResource[] {
            versionMgr.getXAResourceBegin(),
            versionMgr, stateMgr, lockMgr,
            versionMgr.getXAResourceEnd()
        };
        stateMgr.setVirtualProvider(versionMgr);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected InternalVersionManager createVersionManager()
            throws RepositoryException {
        return new InternalXAVersionManager(
                repositoryContext.getInternalVersionManager(),
                repositoryContext.getNodeTypeRegistry(),
                this,
                repositoryContext.getItemStateCacheFactory());
    }
View Full Code Here

        WorkspaceImpl workspace = context.getWorkspace();
        XAItemStateManager stateMgr =
            (XAItemStateManager) workspace.getItemStateManager();
        XALockManager lockMgr =
            (XALockManager) workspace.getInternalLockManager();
        InternalXAVersionManager versionMgr =
            (InternalXAVersionManager) getInternalVersionManager();

        /**
         * Create array that contains all resources that participate in this
         * transactions. Some resources depend on each other, therefore you
         * should only change the sequence if you know what you are doing!
         *
         * There are two artificial resources on the version manager (begin and
         * end), which handle locking of the version manager. The begin resource
         * acquires the write lock on the version manager in its prepare method,
         * while the end resource releases the write lock in either commit or
         * rollback. Please note that the write lock is only acquired if there
         * is something to commit by the version manager.
         * For further information see JCR-335 and JCR-962.
         */
        txResources = new InternalXAResource[] {
            versionMgr.getXAResourceBegin(),
            versionMgr, stateMgr, lockMgr,
            versionMgr.getXAResourceEnd()
        };
        stateMgr.setVirtualProvider(versionMgr);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected InternalVersionManager createVersionManager()
            throws RepositoryException {
        return new InternalXAVersionManager(
                repositoryContext.getInternalVersionManager(),
                repositoryContext.getNodeTypeRegistry(),
                this,
                repositoryContext.getItemStateCacheFactory());
    }
View Full Code Here

        WorkspaceImpl workspace = context.getWorkspace();
        XAItemStateManager stateMgr =
            (XAItemStateManager) workspace.getItemStateManager();
        XALockManager lockMgr =
            (XALockManager) workspace.getInternalLockManager();
        InternalXAVersionManager versionMgr =
            (InternalXAVersionManager) getInternalVersionManager();

        /**
         * Create array that contains all resources that participate in this
         * transactions. Some resources depend on each other, therefore you
         * should only change the sequence if you know what you are doing!
         *
         * There are two artificial resources on the version manager (begin and
         * end), which handle locking of the version manager. The begin resource
         * acquires the write lock on the version manager in its prepare method,
         * while the end resource releases the write lock in either commit or
         * rollback. Please note that the write lock is only acquired if there
         * is something to commit by the version manager.
         * For further information see JCR-335 and JCR-962.
         */
        txResources = new InternalXAResource[] {
            versionMgr.getXAResourceBegin(),
            versionMgr, stateMgr, lockMgr,
            versionMgr.getXAResourceEnd()
        };
        stateMgr.setVirtualProvider(versionMgr);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected InternalVersionManager createVersionManager()
            throws RepositoryException {
        return new InternalXAVersionManager(
                repositoryContext.getInternalVersionManager(),
                repositoryContext.getNodeTypeRegistry(),
                this,
                repositoryContext.getItemStateCacheFactory());
    }
View Full Code Here

     * Initialize this object.
     */
    private void init() throws RepositoryException {
        XAItemStateManager stateMgr = (XAItemStateManager) wsp.getItemStateManager();
        XALockManager lockMgr = (XALockManager) getLockManager();
        InternalXAVersionManager versionMgr = (InternalXAVersionManager) getInternalVersionManager();

        /**
         * Create array that contains all resources that participate in this
         * transactions. Some resources depend on each other, therefore you
         * should only change the sequence if you know what you are doing!
         *
         * There are two artificial resources on the version manager (begin and
         * end), which handle locking of the version manager. The begin resource
         * acquires the write lock on the version manager in its prepare method,
         * while the end resource releases the write lock in either commit or
         * rollback. Please note that the write lock is only acquired if there
         * is something to commit by the version manager.
         * For further information see JCR-335 and JCR-962.
         */
        txResources = new InternalXAResource[] {
            versionMgr.getXAResourceBegin(),
            versionMgr, stateMgr, lockMgr,
            versionMgr.getXAResourceEnd()
        };
        stateMgr.setVirtualProvider(versionMgr);
    }
View Full Code Here

     */
    protected InternalVersionManager createVersionManager(RepositoryImpl rep)
            throws RepositoryException {

        InternalVersionManagerImpl vMgr = (InternalVersionManagerImpl) rep.getVersionManager();
        return new InternalXAVersionManager(vMgr, rep.getNodeTypeRegistry(), this, rep.getItemStateCacheFactory());
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.version.InternalXAVersionManager

Copyright © 2018 www.massapicom. 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.