Package com.arjuna.mw.wst11

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


        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();
        tm.resume(stx);
View Full Code Here


        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);
        ut.rollback();
View Full Code Here

        final TxContext stx = tm.suspend();
        tm.resume(stx);
        tm.enlistForDurableTwoPhase(p3, p3.identifier());
        tm.enlistForVolatileTwoPhase(p4, p4.identifier());

        tm.resume(tx);
        ut.rollback();

        assertTrue(p1.resolved() && !p1.passed());
        assertTrue(p2.resolved() && !p2.passed());
        assertTrue(p3.resolved() && !p3.passed());
View Full Code Here

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

      ut.resume(null);
    }
}
View Full Code Here

        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();
        tm.resume(stx);
View Full Code Here

        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);
        try {
View Full Code Here

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

        tm.resume(tx);
        try {
        ut.commit();
            fail("expecting TransactionRolledBackException");
        } catch (TransactionRolledBackException wse) {
            // expect this
View Full Code Here

      ut.begin();

      System.out.println("\nStarted second transaction.");

      tm.resume(ctx);

      System.out.println("\nCommitting first transaction.\n");
    catch (Exception eouter) {
        try {
            ut.rollback();
View Full Code Here

      TxContext ctx = tm.suspend();

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

      tm.resume(ctx);

      System.out.println("\nResumed\n");
    catch (Exception eouter) {
        try {
            ut.rollback();
View Full Code Here

      TxContext ctx = tm.suspend();

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

      tm.resume(ctx);

      System.out.println("\nResumed");

      ut.commit();
    }
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.