Package org.omg.CORBA

Examples of org.omg.CORBA.TRANSACTION_ROLLEDBACK


    ///////////////////////////////////////////////////////////
   
    public static final int XA_RB = OMGVMCID.value + 1 ;
   
    public TRANSACTION_ROLLEDBACK xaRb( CompletionStatus cs, Throwable t ) {
        TRANSACTION_ROLLEDBACK exc = new TRANSACTION_ROLLEDBACK( XA_RB, cs ) ;
        if (t != null)
            exc.initCause( t ) ;
       
        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "OMG.xaRb",
                parameters, OMGSystemException.class, exc ) ;
View Full Code Here


    }
   
    public static final int XA_NOTA = OMGVMCID.value + 2 ;
   
    public TRANSACTION_ROLLEDBACK xaNota( CompletionStatus cs, Throwable t ) {
        TRANSACTION_ROLLEDBACK exc = new TRANSACTION_ROLLEDBACK( XA_NOTA, cs ) ;
        if (t != null)
            exc.initCause( t ) ;
       
        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "OMG.xaNota",
                parameters, OMGSystemException.class, exc ) ;
View Full Code Here

    }
   
    public static final int XA_END_TRUE_ROLLBACK_DEFERRED = OMGVMCID.value + 3 ;
   
    public TRANSACTION_ROLLEDBACK xaEndTrueRollbackDeferred( CompletionStatus cs, Throwable t ) {
        TRANSACTION_ROLLEDBACK exc = new TRANSACTION_ROLLEDBACK( XA_END_TRUE_ROLLBACK_DEFERRED, cs ) ;
        if (t != null)
            exc.initCause( t ) ;
       
        if (logger.isLoggable( Level.WARNING )) {
            Object[] parameters = null ;
            doLog( Level.WARNING, "OMG.xaEndTrueRollbackDeferred",
                parameters, OMGSystemException.class, exc ) ;
View Full Code Here

      }
      catch (Exception e)
      {
      }

      throw new TRANSACTION_ROLLEDBACK();
        }

        currentAction.addChild((ServerNestedAction) nestedAction);
        currentAction = nestedAction;
    }
      }
      else
      {
    /*
     * Hierarchies may be identical.
     * Remember to check!
     */
      }

      Uid currentUid = Utility.otidToUid(context.current.otid);

      /*
       * currentAction points to the parent of the 'current'
       * transaction, i.e., the last element in the TransIdentity
       * structure. So, ask it if the sent hierarchy's child is
       * one of its children.
       */

      nestedAction = currentAction.getChild(currentUid);

      if (nestedAction == null)
      {
    /*
     * Different notion of current in sent hierarchy.
     * So, add it to the hierarchy here.
     */

    control = currentAction.control();

    /*
     * Now deal with the current transaction.
     */

    TransIdentity currentID = context.current;

    control = ServerFactory.create_subtransaction(currentUid,
                  currentID.coord, currentID.term, control);
    nestedAction = new ServerNestedAction(control);

    if (!nestedAction.valid())
    {
        /*
         * Just deal with current transaction. Others must have
         * been registered successfully, and will be deal with
         * automatically when the parent transaction terminates.
         */

        try
        {
      ((ServerNestedAction) nestedAction).rollback()// does dispose as well!
      nestedAction = null;
        }
        catch (Exception e)
        {
        }

        throw new TRANSACTION_ROLLEDBACK();
    }

    currentAction.addChild((ServerNestedAction) nestedAction);
      }
      else
View Full Code Here

    case ActionStatus.COMMITTING: // in case asynchronous commit!
      return;
    case ActionStatus.ABORTING:
    case ActionStatus.ABORTED:
    case ActionStatus.H_ROLLBACK:
      throw new TRANSACTION_ROLLEDBACK(ExceptionCodes.FAILED_TO_COMMIT,
          CompletionStatus.COMPLETED_NO);
    case ActionStatus.H_HAZARD:
    default:
      throw new HeuristicHazard();
    }
View Full Code Here

    case ActionStatus.H_COMMIT:
    case ActionStatus.COMMITTING: // in case asynchronous commit!
      return;
    case ActionStatus.ABORTED:
    case ActionStatus.H_ROLLBACK:
      throw new TRANSACTION_ROLLEDBACK(ExceptionCodes.FAILED_TO_COMMIT,
          CompletionStatus.COMPLETED_NO);
    case ActionStatus.H_MIXED:
      throw new HeuristicMixed();
    case ActionStatus.H_HAZARD:
    default:
View Full Code Here

            + Utility.stringStatus(currentStatus));
      }

      if (currentStatus == Status.StatusMarkedRollback)
      {
        throw new TRANSACTION_ROLLEDBACK(
            ExceptionCodes.MARKED_ROLLEDBACK,
            CompletionStatus.COMPLETED_NO);
      }
      else
        throw new Inactive();
View Full Code Here

    if (currentStatus != Status.StatusActive)
    {
      if (currentStatus == Status.StatusMarkedRollback)
      {
        throw new TRANSACTION_ROLLEDBACK(
            ExceptionCodes.MARKED_ROLLEDBACK,
            CompletionStatus.COMPLETED_NO);
      }
      else
        throw new Inactive();
View Full Code Here

              + Utility.stringStatus(currentStatus));
        }

        if (currentStatus == Status.StatusMarkedRollback)
        {
          throw new TRANSACTION_ROLLEDBACK(
              ExceptionCodes.MARKED_ROLLEDBACK,
              CompletionStatus.COMPLETED_NO);
        }
        else
          throw new Inactive();
View Full Code Here

      }
      catch (Exception e)
      {
      }

      throw new TRANSACTION_ROLLEDBACK();
  }
 
  InterposedHierarchy newElement = new InterposedHierarchy((ServerStrictTopLevelAction) action);
   
  _head.add(newElement);

  if (depth > 0// current is a nested transaction
  {
      /*
       * Now deal with any nested transactions.
       * As we create, register with the original transactions.
       */

      ServerResource nestedAction = null;
     
      for (int i = depth -2; i >= 0; i--)
      {
    tmpCoord = ctx.parents[i].coord;
    tmpTerm = ctx.parents[i].term;

    control = ServerFactory.create_subtransaction(Utility.otidToUid(ctx.parents[i].otid),
                  tmpCoord, tmpTerm, control);
     
    nestedAction = new ServerStrictNestedAction(control, false)// not current, so don't register

    if (!nestedAction.valid())
    {
        /*
         * Just deal with current transaction. Others must have been
         * registered successfully, and will be deal with automatically
         * when the parent transaction terminates.
         */
   
        try
        {
      ((ServerStrictNestedAction) nestedAction).rollback_subtransaction()// does dispose as well!
      nestedAction = null;
        }
        catch (Exception e)
        {
        }

        throw new TRANSACTION_ROLLEDBACK();
    }

    /*
     * Add transaction resource to list.
     */

    action.addChild((ServerStrictNestedAction) nestedAction);
    action = nestedAction;
      }

      /*
       * Now deal with current transaction. If there is
       * only one transaction we do nothing.
       */

      tmpCoord = ctx.current.coord;
      tmpTerm = ctx.current.term;

      control = ServerFactory.create_subtransaction(Utility.otidToUid(ctx.current.otid),
                    tmpCoord, tmpTerm, control);
 
      nestedAction = new ServerStrictNestedAction(control, true)// current, so register

      if (!nestedAction.valid())
      {
    /*
     * Just deal with current transaction. Others must have been
     * registered successfully, and will be deal with automatically
     * when the parent transaction terminates.
     */
   
    try
    {
        ((ServerStrictNestedAction) nestedAction).rollback_subtransaction()// does dispose as well!
        nestedAction = null;
    }
    catch (Exception e)
    {
    }

    throw new TRANSACTION_ROLLEDBACK();
      }
 
      action.addChild((ServerStrictNestedAction) nestedAction);
  }

View Full Code Here

TOP

Related Classes of org.omg.CORBA.TRANSACTION_ROLLEDBACK

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.