Package org.apache.jackrabbit.core.state

Examples of org.apache.jackrabbit.core.state.XAItemStateManager$CommitLog


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

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


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

        /**
         * Create array that contains all resources that paricipate in this
         * transactions. Because some resources depend on each other, there is
         * also a workspace scoped lock resource inserted, that guards the
         * entire transaction from deadlocks (see JCR-335)
         */
        txResources = new InternalXAResource[] {
            ((XAWorkspace) wsp).getXAResourceBegin(),
            stateMgr, lockMgr, versionMgr,
            ((XAWorkspace) wsp).getXAResourceEnd()
        };
        stateMgr.setVirtualProvider(versionMgr);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    protected LocalItemStateManager createItemStateManager(SharedItemStateManager shared) {
        return new XAItemStateManager(shared, this);
    }
View Full Code Here

            throws RepositoryException {

        this.vMgr = vMgr;
        this.ntReg = ntReg;
        this.session = session;
        this.stateMgr = new XAItemStateManager(vMgr.getSharedStateMgr(),
                this, CHANGE_LOG_ATTRIBUTE_NAME);

        NodeState state;
        try {
            state = (NodeState) stateMgr.getItemState(vMgr.getHistoryRootId());
View Full Code Here

    /**
     * Initialize this object.
     */
    private void init() throws RepositoryException {
        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

    /**
     * Initialize this object.
     */
    private void init() throws RepositoryException {
        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

                            SessionImpl session, ItemStateCacheFactory cacheFactory)
            throws RepositoryException {
        super(ntReg);
        this.vMgr = vMgr;
        this.session = session;
        this.stateMgr = new XAItemStateManager(vMgr.getSharedStateMgr(),
                this, CHANGE_LOG_ATTRIBUTE_NAME, cacheFactory);

        NodeState state;
        try {
            state = (NodeState) stateMgr.getItemState(vMgr.getHistoryRootId());
View Full Code Here

                            SessionImpl session, ItemStateCacheFactory cacheFactory)
            throws RepositoryException {
        super(ntReg);
        this.vMgr = vMgr;
        this.session = session;
        this.stateMgr = new XAItemStateManager(vMgr.getSharedStateMgr(),
                this, CHANGE_LOG_ATTRIBUTE_NAME, cacheFactory);

        NodeState state;
        try {
            state = (NodeState) stateMgr.getItemState(vMgr.getHistoryRootId());
View Full Code Here

            throws RepositoryException {

        this.vMgr = vMgr;
        this.ntReg = ntReg;
        this.session = session;
        this.stateMgr = new XAItemStateManager(vMgr.getSharedStateMgr(),
                this, CHANGE_LOG_ATTRIBUTE_NAME, cacheFactory);

        NodeState state;
        try {
            state = (NodeState) stateMgr.getItemState(vMgr.getHistoryRootId());
View Full Code Here

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

        txResources = new InternalXAResource[] {
            stateMgr, lockMgr, versionMgr
        };
        stateMgr.setVirtualProvider(versionMgr);
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.core.state.XAItemStateManager$CommitLog

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.