Package org.apache.isis.core.runtime.system.transaction

Examples of org.apache.isis.core.runtime.system.transaction.IsisTransaction$PreAndPostValues$Predicates


        withLogging(pojo, new Runnable() {
            @Override
            public void run() {
                ObjectAdapter adapter = getAdapterManager().getAdapterFor(pojo);
               
                final IsisTransaction transaction = getCurrentTransaction();
                transaction.enlistDeleting(adapter);

                ensureFrameworksInAgreement(pojo);
            }
        }, calledFrom);
       
View Full Code Here


    public void close() {
        ensureOpened();
        ensureThatState(persistenceManager, is(notNullValue()));

        try {
            final IsisTransaction currentTransaction = getTransactionManager().getTransaction();
            if (currentTransaction != null && !currentTransaction.getState().isComplete()) {
                if(currentTransaction.getState().canCommit()) {
                    getTransactionManager().endTransaction();
                } else if(currentTransaction.getState().canAbort()) {
                    getTransactionManager().abortTransaction();
                }
            }
        } finally {
            // make sure release everything ok.
View Full Code Here


   
    public void beginTran() {
        final IsisTransactionManager transactionManager = getTransactionManager();
        final IsisTransaction transaction = transactionManager.getTransaction();

        if(transaction == null) {
            transactionManager.startTransaction();
            return;
        }

        final State state = transaction.getState();
        switch(state) {
            case COMMITTED:
            case ABORTED:
                transactionManager.startTransaction();
                break;
View Full Code Here

       
    }

    public void commitTran() {
        final IsisTransactionManager transactionManager = getTransactionManager();
        final IsisTransaction transaction = transactionManager.getTransaction();
        if(transaction == null) {
            Assert.fail("No transaction exists");
            return;
        }
        final State state = transaction.getState();
        switch(state) {
            case COMMITTED:
            case ABORTED:
            case MUST_ABORT:
                Assert.fail("Transaction is in state of '" + state + "'");
View Full Code Here

        }
    }

    public void abortTran() {
        final IsisTransactionManager transactionManager = getTransactionManager();
        final IsisTransaction transaction = transactionManager.getTransaction();
        if(transaction == null) {
            Assert.fail("No transaction exists");
            return;
        }
        final State state = transaction.getState();
        switch(state) {
            case ABORTED:
                break;
            case COMMITTED:
                Assert.fail("Transaction is in state of '" + state + "'");
View Full Code Here

    public void close() {
        ensureOpened();
        ensureThatState(persistenceManager, is(notNullValue()));

        try {
            final IsisTransaction currentTransaction = getTransactionManager().getTransaction();
            if (currentTransaction != null && !currentTransaction.getState().isComplete()) {
                if(currentTransaction.getState().canCommit()) {
                    getTransactionManager().endTransaction();
                } else if(currentTransaction.getState().canAbort()) {
                    getTransactionManager().abortTransaction();
                }
            }
        } finally {
            // make sure release everything ok.
View Full Code Here

                   
                    getPersistenceSession().remapAsPersistent(adapter, persistentOid);

                    callbackFacetClass = PersistedCallbackFacet.class;
                   
                    final IsisTransaction transaction = getCurrentTransaction();
                    transaction.enlistCreated(adapter);
                } else {
                    // updating
                    callbackFacetClass = UpdatedCallbackFacet.class;
                   
                    // no need to call transaction.enlist(..);
View Full Code Here

                    //
                    // however, at the same time, Isis has only queued up a CreateObjectCommand for the transient object, but it
                    // hasn't yet executed, so thinks that the adapter is still transient.
                    return;
                }
                final IsisTransaction transaction = getCurrentTransaction();
                transaction.enlistUpdating(adapter);

                ensureRootObject(pojo);
                ensureFrameworksInAgreement(pojo);
            }
        }, calledFrom);
View Full Code Here

        withLogging(pojo, new Runnable() {
            @Override
            public void run() {
                ObjectAdapter adapter = getAdapterManager().getAdapterFor(pojo);
               
                final IsisTransaction transaction = getCurrentTransaction();
                transaction.enlistDeleting(adapter);

                ensureFrameworksInAgreement(pojo);
            }
        }, calledFrom);
       
View Full Code Here

TOP

Related Classes of org.apache.isis.core.runtime.system.transaction.IsisTransaction$PreAndPostValues$Predicates

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.