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

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


      TransactionImple tx = TxImporter.getImportedTransaction(xid);
     
      if (tx == null)
        throw new XAException(XAException.XAER_INVAL);
     
      tx.doRollback();
     
      TxImporter.removeImportedTransaction(xid);
    }
    catch (XAException ex)
    {
View Full Code Here


                // try to use the exception code and cause to provide info whilst
                // ramining API compliant.  JBTM-427.
                Exception initCause = null;
                int xaExceptionCode = XAException.XA_RBROLLBACK;
                try {
                    tx.doRollback();
                } catch(HeuristicCommitException e) {
                    initCause = e;
                    xaExceptionCode = XAException.XAER_RMERR;
                } catch (HeuristicMixedException e) {
                    initCause = e;
View Full Code Here

      TransactionImple tx = TxImporter.getImportedTransaction(xid);

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

      tx.doRollback();

      TxImporter.removeImportedTransaction(xid);
    }
    catch (XAException ex)
    {
View Full Code Here

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

      tm.doRollback();
    }

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

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

      tm.doPrepare();
      tm.doRollback();
    }

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

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

        final TransactionImple tm = new TransactionImple(0);
        final TestSynchronization sync = new TestSynchronization();
        tm.registerSynchronization(sync);
        tm.setRollbackOnly();
        assertEquals(TwoPhaseOutcome.PREPARE_NOTOK, tm.doPrepare());
        tm.doRollback();
        assertFalse(sync.isBeforeCompletionDone());
        assertTrue(sync.isAfterCompletionDone());
        assertEquals(javax.transaction.Status.STATUS_ROLLEDBACK, tm.getStatus());
    }
View Full Code Here

                // try to use the exception code and cause to provide info whilst
                // remaining API compliant.  JBTM-427.
                Exception initCause = null;
                int xaExceptionCode = XAException.XA_RBROLLBACK;
                try {
                    tx.doRollback();
                } catch(HeuristicCommitException e) {
                    initCause = e;
                    xaExceptionCode = XAException.XAER_RMERR;
                } catch (HeuristicMixedException e) {
                    initCause = e;
View Full Code Here

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

      if (tx.activated())
      {
        tx.doRollback();

        TxImporter.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.