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

Examples of com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.TransactionImple.doOnePhaseCommit()


     
      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);
     
      if (onePhase)
        tx.doOnePhaseCommit();
      else
        tx.doCommit();
     
      TxImporter.removeImportedTransaction(xid);
    }
View Full Code Here


      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);

      if (onePhase)
        tx.doOnePhaseCommit();
      else
        tx.doCommit();

      TxImporter.removeImportedTransaction(xid);
    }
View Full Code Here

  {
    for (int i = 0; i < 1000; i++)
    {
      final TransactionImple tm = new TransactionImple(0); // implicit begin

      tm.doOnePhaseCommit();
    }

    assertEquals(ActionManager.manager().inflightTransactions().size(), 0);
  }
View Full Code Here

    public void testOnePhaseCommitSync() throws Exception
    {
        final TransactionImple tm = new TransactionImple(0);
        final TestSynchronization sync = new TestSynchronization();
        tm.registerSynchronization(sync);
        tm.doOnePhaseCommit();
        assertTrue(sync.isBeforeCompletionDone());
        assertTrue(sync.isAfterCompletionDone());
        assertEquals(javax.transaction.Status.STATUS_COMMITTED, tm.getStatus());
    }
View Full Code Here

        final TransactionImple tm = new TransactionImple(0);
        final TestSynchronization sync = new TestSynchronization();
        tm.registerSynchronization(sync);
        tm.setRollbackOnly();
        try {
            tm.doOnePhaseCommit();
            fail("did not get expected rollback exception");
        } catch(RollbackException e) {
            // expected - we tried to commit a rollbackonly tx.
        }
        assertFalse(sync.isBeforeCompletionDone());
View Full Code Here

        tm.registerSynchronization(sync);
        tm.setRollbackOnly();
        final XATerminator xaTerminator = new XATerminatorImple();
        try {
            xaTerminator.commit(xid, true);
            tm.doOnePhaseCommit();
            fail("did not get expected rollback exception");
        } catch(XAException e) {
            assertEquals("javax.transaction.RollbackException", e.getCause().getClass().getName());
            assertEquals(XAException.XA_RBROLLBACK, e.errorCode);
            // expected - we tried to commit a rollbackonly tx.
View Full Code Here

        throw new XAException(XAException.XAER_INVAL);

      if (tx.activated())
      {
        if (onePhase)
          tx.doOnePhaseCommit();
        else
          tx.doCommit();

        TxImporter.removeImportedTransaction(xid);
      }
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.