Package com.arjuna.ats.arjuna

Examples of com.arjuna.ats.arjuna.AtomicAction.begin()


        }

        // Create a new JBoss transaction
        AtomicAction tx = new AtomicAction();
        // Allocate space to monitor the transaction, this variable is overriden each time the transaction is used.
        int actionStatus = tx.begin(); // Top level begin

        // If the transaction was successful began
        if (actionStatus == ActionStatus.RUNNING)
        {
            // Enlist the participant
View Full Code Here


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

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

private void test () throws Exception
    {
  AtomicAction A = new AtomicAction();

  A.begin();

  A = null;

  System.gc();
    }
View Full Code Here

    {
      try
      {
        AtomicAction A = new AtomicAction();

        A.begin();

        A.add(new BasicRecord());

        A.commit();
      }
View Full Code Here

    {
      try
      {
        AtomicAction A = new AtomicAction();
       
        A.begin();
       
        A.add(new BasicRecord());
       
        A.commit();
      }
View Full Code Here

    {
  for (int i = 0; i < 100; i++)
  {
      AtomicAction A = new AtomicAction();

      A.begin();

      BasicObject bo = new BasicObject();

      bo.set(2);
View Full Code Here

      A.commit();

      AtomicAction B = new AtomicAction();

      B.begin();

      bo.destroy();

      B.abort();
View Full Code Here

      B.abort();

      AtomicAction C = new AtomicAction();

      C.begin();

      bo.destroy();

      C.commit();
  }
View Full Code Here

    AtomicAction A = new AtomicAction();
    Uid txId = A.get_uid();
   
    System.err.println("IMPORTANT: if there are warnings about USER_DEF_FIRST0 then the test has failed!");
   
    A.begin();

    A.add(new BasicRecord());

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