Package com.arjuna.ats.arjuna

Examples of com.arjuna.ats.arjuna.LastResourceRecord


     
      System.err.println("Starting top-level action.");

            A.begin();

      A.add(new LastResourceRecord(opRes));
      A.add(new ShutdownRecord(ShutdownRecord.FAIL_IN_PREPARE));
     
      A.commit();

      if (opRes.status() != OnePhase.COMMITTED)
      {
    System.err.println("Confirmed that one-phase record is last in prepare.");

    A = new AtomicAction();
    opRes = new OnePhase();

    A.begin();
   
    System.err.println("\nStarting new top-level action.");

    A.add(new LastResourceRecord(opRes));
    A.add(new ShutdownRecord(ShutdownRecord.FAIL_IN_COMMIT));

    A.commit();
   
    if (opRes.status() == OnePhase.COMMITTED)
    {
        System.err.println("Confirmed that one-phase record is first in commit.");

        A = new AtomicAction();
       
        A.begin();
       
        A.add(new LastResourceRecord(new OnePhase()));
       
        if (A.add(new LastResourceRecord(new OnePhase())) == AddOutcome.AR_DUPLICATE)
        {
      System.err.println("\nConfirmed that only one such resource can be added.");
     
      assertSuccess();
        }
View Full Code Here

TOP

Related Classes of com.arjuna.ats.arjuna.LastResourceRecord

Copyright © 2018 www.massapicom. 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.