Package org.omg.CosTransactions

Examples of org.omg.CosTransactions.Control


      Current current = OTS.get_current();

      current.begin();
      current.rollback();

      Control control = current.suspend();

      correct = (control == null);

      if (correct)
      {
View Full Code Here


          int y1 = Math.abs(_random.nextInt() % _matrixHeight);

          IntHolder location0Value = new IntHolder();
          IntHolder location1Value = new IntHolder();

          Control control = OTS.current().get_control();

          _matrix.get_value(x0, y0, location0Value, control);
          _matrix.get_value(x1, y1, location1Value, control);

          _matrix.set_value(x0, y0, location1Value.value + d, control);
View Full Code Here

            int y1 = Math.abs(_random.nextInt() % _matrixHeight);

            IntHolder location0Value = new IntHolder();
            IntHolder location1Value = new IntHolder();

            Control control = OTS.current().get_control();

            _matrix.get_value(x0, y0, location0Value, control);
            _matrix.get_value(x1, y1, location1Value, control);

            _matrix.set_value(x0, y0, location1Value.value + d, control);
View Full Code Here

            int y1 = Math.abs(_random.nextInt() % _matrixHeight);

            IntHolder srcValue = new IntHolder();
            IntHolder dstValue = new IntHolder();

            Control control = OTS.current().get_control();

            _matrix.get_value(x0, y0, srcValue, control);

            if (srcValue.value == 1)
            {
View Full Code Here

          int y1 = Math.abs(_random.nextInt() % _matrixHeight);

          IntHolder srcValue = new IntHolder();
          IntHolder dstValue = new IntHolder();

          Control control = OTS.current().get_control();

          _matrix.get_value(x0, y0, srcValue, control);

          if (srcValue.value == 1)
          {
View Full Code Here

      transactionFactory = TransactionFactoryHelper.narrow(ORBServices.getService(ORBServices.transactionService, transactionFactoryParams));


      boolean correct = true;
      Control control = transactionFactory.create(0);

      correct = correct && (control.get_coordinator().get_status() == Status.StatusActive);

      control.get_terminator().rollback();

      if (correct)
      {
        System.out.println("Passed");
      }
View Full Code Here

      boolean correct = true;

      for (int index = 0; correct && (index < numberOfControls); index++)
      {
        Control control = transactionFactory.create(0);

        correct = correct && (control.get_coordinator().get_status() == Status.StatusActive);

        control.get_terminator().commit(false);
      }

      if (correct)
      {
        System.out.println("Passed");
View Full Code Here

      transactionFactory = TransactionFactoryHelper.narrow(ORBServices.getService(ORBServices.transactionService, transactionFactoryParams));


      boolean correct;
      Control control = transactionFactory.create(4);

      Thread.sleep(8000);

      try
      {
        control.get_terminator().commit(true);
        correct = false;
      }
      catch (INVALID_TRANSACTION invalidTransaction)
      {
        correct = true;
View Full Code Here

      transactionFactory = TransactionFactoryHelper.narrow(ORBServices.getService(ORBServices.transactionService, transactionFactoryParams));


      boolean correct;
      Control control = transactionFactory.create(4);

      Thread.sleep(8000);

      try
      {
        control.get_terminator().commit(false);
        correct = false;
      }
      catch (INVALID_TRANSACTION invalidTransaction)
      {
        correct = true;
View Full Code Here

      transactionFactory = TransactionFactoryHelper.narrow(ORBServices.getService(ORBServices.transactionService, transactionFactoryParams));


      boolean correct = true;
      Control control = transactionFactory.create(4);

      Thread.sleep(8000);

      correct = correct && (control.get_coordinator().get_status() == Status.StatusRolledBack);

      if (correct)
      {
        System.out.println("Passed");
      }
View Full Code Here

TOP

Related Classes of org.omg.CosTransactions.Control

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.