Package com.arjuna.ats.internal.jta.transaction.arjunacore.jca

Examples of com.arjuna.ats.internal.jta.transaction.arjunacore.jca.SubordinateTransaction.doCommit()


    {
        final SubordinateTransaction tm = createTransaction();
        final TestSynchronization sync = new TestSynchronization();
        tm.registerSynchronization(sync);
        assertEquals(TwoPhaseOutcome.PREPARE_READONLY, tm.doPrepare());
        tm.doCommit();
        assertTrue(sync.isBeforeCompletionDone());
        assertTrue(sync.isAfterCompletionDone());
        assertEquals(javax.transaction.Status.STATUS_COMMITTED, tm.getStatus());
    }
View Full Code Here


        tm.registerSynchronization(sync);
        final TestXAResource xaResource = new TestXAResource();
        xaResource.setPrepareReturnValue(XAResource.XA_OK);
        tm.enlistResource(xaResource);
        assertEquals(TwoPhaseOutcome.PREPARE_OK, tm.doPrepare());
        tm.doCommit();
        assertTrue(sync.isBeforeCompletionDone());
        assertTrue(sync.isAfterCompletionDone());
        assertEquals(javax.transaction.Status.STATUS_COMMITTED, tm.getStatus());
    }
View Full Code Here

            if (tx.baseXid() != null) // activate failed?
            {
                if (onePhase)
                    tx.doOnePhaseCommit();
                else
                    tx.doCommit();

                SubordinationManager.getTransactionImporter()
                        .removeImportedTransaction(xid);
            }
            else
View Full Code Here

            if (subordinateTransaction.activated()) {
                if (this.onePhaseCommit) {
                    subordinateTransaction.doOnePhaseCommit();
                } else {
                    subordinateTransaction.doCommit();
                }
                // remove the tx
                SubordinationManager.getTransactionImporter().removeImportedTransaction(xid);
            } else {
                throw new XAException(XAException.XA_RETRY);
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.