Package org.omg.CORBA

Examples of org.omg.CORBA.TRANSACTION_ROLLEDBACK


      }
      catch (Exception e)
      {
      }

      throw new TRANSACTION_ROLLEDBACK();
        }

        currentAction.addChild((ServerStrictNestedAction) 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 ServerStrictNestedAction(control, true);

    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()// does dispose as well!
      nestedAction = null;
        }
        catch (Exception e)
        {
        }

        throw new TRANSACTION_ROLLEDBACK();
    }
   
    currentAction.addChild((ServerStrictNestedAction) nestedAction);
      }
      else
View Full Code Here


    catch (NullPointerException ex// if local handle is null then it was terminated (probably by reaper)
    {
        // check termination status
       
        if (_controlImpl.getFinalStatus() != org.omg.CosTransactions.Status.StatusCommitted)
                        throw new TRANSACTION_ROLLEDBACK();
    }
  }
View Full Code Here

          throw new Unavailable();
      }
    }
    catch (NullPointerException ex)
    {
      throw new TRANSACTION_ROLLEDBACK();
    }
  }
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_HAZARD:
    default:
      throw new HeuristicHazard();
    }
View Full Code Here

    case ActionStatus.COMMITTING: // in case asynchronous commit!
      return;
    case ActionStatus.ABORTED:
    case ActionStatus.ABORTING:  // in case of asynchronous abort!
    case ActionStatus.H_ROLLBACK:
      throw new TRANSACTION_ROLLEDBACK(ExceptionCodes.FAILED_TO_COMMIT,
          CompletionStatus.COMPLETED_NO);
    case ActionStatus.H_MIXED:
        if (report_heuristics)
      throw new HeuristicMixed();       
        break;
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();
  }

  ServerTopLevelAction newElement = (ServerOSITopLevelAction)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(OTIDMap.find(ctx.parents[i].otid),
                  tmpCoord, tmpTerm, control);

    nestedAction = new ServerOSINestedAction(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
        {
      ((ServerOSINestedAction) nestedAction).rollback_subtransaction()// does dispose as well!
      nestedAction = null;
        }
        catch (Exception e)
        {
        }

        throw new TRANSACTION_ROLLEDBACK();
    }

    /*
     * Add transaction resource to list.
     */

    action.addChild((ServerOSINestedAction) 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(OTIDMap.find(ctx.current.otid),
                    tmpCoord, tmpTerm, control);

      nestedAction = new ServerOSINestedAction(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
    {
        ((ServerOSINestedAction) nestedAction).rollback_subtransaction()// does dispose as well!
        nestedAction = null;
    }
    catch (Exception e)
    {
    }

    throw new TRANSACTION_ROLLEDBACK();
      }

      action.addChild((ServerOSINestedAction) nestedAction);
  }

View Full Code Here

      }
      catch (Exception e)
      {
      }

      throw new TRANSACTION_ROLLEDBACK();
        }

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

      Uid currentUid = OTIDMap.find(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 ServerOSINestedAction(control, true);

    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
        {
      ((ServerOSINestedAction) nestedAction).rollback()// does dispose as well!
      nestedAction = null;
        }
        catch (Exception e)
        {
        }

        throw new TRANSACTION_ROLLEDBACK();
    }

    currentAction.addChild((ServerOSINestedAction) nestedAction);
      }
      else
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.