Package com.arjuna.mw.wst11

Examples of com.arjuna.mw.wst11.TransactionManager.suspend()


    public static void testSuspendNullTransaction()
            throws Exception
    {
      TransactionManager ut = TransactionManager.getTransactionManager();

      TxContext ctx = ut.suspend();

      System.out.println("Suspended: "+ctx);

      assertTrue(ctx == null);
    }
View Full Code Here


      UserTransaction ut = UserTransaction.getUserTransaction();
      TransactionManager tm = TransactionManager.getTransactionManager();

      ut.begin();

      TxContext ctx = tm.suspend();

      System.out.println("Suspended: "+ctx);
    }
}
View Full Code Here

        final DemoVolatileParticipant p2 = new DemoVolatileParticipant();
        final DemoDurableParticipant p3 = new DemoDurableParticipant();
        final DemoVolatileParticipant p4 = new DemoVolatileParticipant();

        ut.begin();
        final TxContext tx = tm.suspend();
        tm.resume(tx);
        tm.enlistForDurableTwoPhase(p1, p1.identifier());
        tm.enlistForVolatileTwoPhase(p2, p2.identifier());
        ust.begin();
        final TxContext stx = tm.suspend();
View Full Code Here

        final TxContext tx = tm.suspend();
        tm.resume(tx);
        tm.enlistForDurableTwoPhase(p1, p1.identifier());
        tm.enlistForVolatileTwoPhase(p2, p2.identifier());
        ust.begin();
        final TxContext stx = tm.suspend();
        tm.resume(stx);
        tm.enlistForDurableTwoPhase(p3, p3.identifier());
        tm.enlistForVolatileTwoPhase(p4, p4.identifier());

        tm.resume(tx);
View Full Code Here

        final DemoVolatileParticipant p2 = new DemoVolatileParticipant();
        final FailureParticipant p3 = new FailureParticipant(FailureParticipant.FAIL_IN_PREPARE, FailureParticipant.WRONG_STATE);
        final DemoVolatileParticipant p4 = new DemoVolatileParticipant();

        ut.begin();
        final TxContext tx = tm.suspend();
        tm.resume(tx);
        tm.enlistForDurableTwoPhase(p1, p1.identifier());
        tm.enlistForVolatileTwoPhase(p2, p2.identifier());
        ust.begin();
        final TxContext stx = tm.suspend();
View Full Code Here

        final TxContext tx = tm.suspend();
        tm.resume(tx);
        tm.enlistForDurableTwoPhase(p1, p1.identifier());
        tm.enlistForVolatileTwoPhase(p2, p2.identifier());
        ust.begin();
        final TxContext stx = tm.suspend();
        tm.resume(stx);
        tm.enlistForDurableTwoPhase(p3, "failure in prepare");
        tm.enlistForVolatileTwoPhase(p4, p4.identifier());

        tm.resume(tx);
View Full Code Here

      tm.enlistForDurableTwoPhase(p1, p1.identifier());
      tm.enlistForDurableTwoPhase(p2, p2.identifier());
      tm.enlistForDurableTwoPhase(p3, p3.identifier());
      tm.enlistForDurableTwoPhase(p4, p4.identifier());

      TxContext ctx = tm.suspend();

      System.out.println("Suspended: "+ctx);

      ut.begin();
View Full Code Here

  try {
      ut.begin();

      tm.enlistForDurableTwoPhase(p, p.identifier());

      TxContext ctx = tm.suspend();

      System.out.println("Suspended: "+ctx);

      tm.resume(ctx);
View Full Code Here

      UserTransaction ut = UserTransaction.getUserTransaction();
      TransactionManager tm = TransactionManager.getTransactionManager();

      ut.begin();

      TxContext ctx = tm.suspend();

      System.out.println("Suspended: "+ctx);

      tm.resume(ctx);
View Full Code Here

        final DemoVolatileParticipant p2 = new DemoVolatileParticipant();
        final FailureParticipant p3 = new FailureParticipant(FailureParticipant.FAIL_IN_PREPARE, FailureParticipant.NONE);
        final DemoVolatileParticipant p4 = new DemoVolatileParticipant();

        ut.begin();
        final TxContext tx = tm.suspend();
        tm.resume(tx);
        tm.enlistForDurableTwoPhase(p1, p1.identifier());
        tm.enlistForVolatileTwoPhase(p2, p2.identifier());
        ust.begin();
        final TxContext stx = tm.suspend();
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.