Examples of enlistForDurableTwoPhase()


Examples of com.arjuna.mw.wst.TransactionManager.enlistForDurableTwoPhase()

        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);
        tm.enlistForDurableTwoPhase(p3, "failure in prepare");
View Full Code Here

Examples of com.arjuna.mw.wst.TransactionManager.enlistForDurableTwoPhase()

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

Examples of com.arjuna.mw.wst.TransactionManager.enlistForDurableTwoPhase()

        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);
        tm.enlistForDurableTwoPhase(p3, p3.identifier());
View Full Code Here

Examples of com.arjuna.mw.wst.TransactionManager.enlistForDurableTwoPhase()

        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.commit();
        assertTrue(p1.prepared() && p1.resolved() && p1.passed());
View Full Code Here

Examples of com.arjuna.mw.wst.TransactionManager.enlistForDurableTwoPhase()

        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);
        tm.enlistForDurableTwoPhase(p3, p3.identifier());
View Full Code Here

Examples of com.arjuna.mw.wst.TransactionManager.enlistForDurableTwoPhase()

        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

Examples of com.arjuna.mw.wst.TransactionManager.enlistForDurableTwoPhase()

      DemoDurableParticipant p = new DemoDurableParticipant();
      DemoVolatileParticipant pz = new DemoVolatileParticipant();
     
      ut.begin();
    try {
      tm.enlistForDurableTwoPhase(p, p.identifier());
      tm.enlistForVolatileTwoPhase(pz, pz.identifier());
    catch (Exception eouter) {
        try {
            ut.rollback();
        } catch(Exception einner) {
View Full Code Here

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

            // enlist the Participant for this service:
            RestaurantParticipant restaurantParticipant = new RestaurantParticipant(transactionId);
            TransactionManager transactionManager = TransactionManagerFactory.transactionManager();
            System.out.println("[SERVICE] Enlisting a Durable2PC participant into the AT");
            transactionManager.enlistForDurableTwoPhase(restaurantParticipant, "restaurantServiceAT:" + UUID.randomUUID());
        } catch (Exception e) {
            throw new RestaurantException("Error when enlisting participant", e);
        }

        // invoke the backend business logic:
View Full Code Here

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

            // enlist the Participant for this service:
            TransactionManager transactionManager = TransactionManagerFactory.transactionManager();
            RestaurantParticipant restaurantParticipant = new RestaurantParticipant(transactionId);
            log.info("[SERVICE] Enlisting a Durable2PC participant into the AT");
            transactionManager.enlistForDurableTwoPhase(restaurantParticipant, "restaurantServiceAT:" + new Uid().toString());

            RestaurantVolatileParticipant restaurantVolatileParticipant = new RestaurantVolatileParticipant(transactionId);
            log.info("[SERVICE] Enlisting a Volatile2PC participant into the AT");
            transactionManager.enlistForVolatileTwoPhase(restaurantVolatileParticipant, "restaurantServiceAT:" + new Uid().toString());
View Full Code Here

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

           
            // Enlist the Durable Participant for this service
            TransactionManager transactionManager = TransactionManagerFactory.transactionManager();
            ATDurableParticipant durableParticipant = new ATDurableParticipant(serviceCommands, callName, eventLog, transactionId);
            log.info("[SERVICE] Enlisting a Durable2PC participant into the AT");
            transactionManager.enlistForDurableTwoPhase(durableParticipant, "ATServiceDurable:" + new Uid().toString());
           
            // Enlist the Volatile Participant for this service
            ATVolatileParticipant volatileParticipant = new ATVolatileParticipant(serviceCommands, callName, eventLog, transactionId);
            log.info("[SERVICE] Enlisting a VolatilePC participant into the AT");
            transactionManager.enlistForVolatileTwoPhase(volatileParticipant, "ATServiceVolatile:" + new Uid().toString());
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.