/**
   * Overridden from RequestInfoImpl. This version calls the super and then, if we are changing to
   * ending points, executes all enqueued AddReplyServiceContextCommands.
   */
  protected void setCurrentExecutionPoint(int executionPoint) {
    super.setCurrentExecutionPoint(executionPoint);

    // If we are transitioning to ending point, we will now have a pointer
    // to the reply service contexts, so we can execute all queued
    // add reply service context requests.
    if ((executionPoint == EXECUTION_POINT_ENDING) && (addReplyServiceContextQueue != null)) {
      int size = addReplyServiceContextQueue.size();
      for (int i = 0; i < size; i++) {
        AddReplyServiceContextCommand addReply =
            (AddReplyServiceContextCommand) addReplyServiceContextQueue.get(i);
        try {
          add_reply_service_context(addReply.service_context, addReply.replace);
        } catch (BAD_INV_ORDER e) {
          // _REVISIT_  The only way this can happen is if during
          // rrsc or rr, the interceptor tried to add with
          // replace=false to a service context that is present in
          // the reply message.  At that time there was no way for
          // us to check for this, so the best we can do is ignore
          // the original request.
        }
      }

      // We specifically do not empty the SC queue so that if
      // the interceptor raises an exception the queued service contexts
      // will be put in the exception response.
    }
  }
  /** Reset the info object so that it can be reused for a retry, for example. */
  void reset() {
    super.reset();

    // Please keep these in the same order as declared above.

    forwardRequestRaisedInEnding = false;

    request = null;
    servant = null;
    objectId = null;
    oktemp = null;

    adapterId = null;
    adapterName = null;

    addReplyServiceContextQueue = null;
    replyMessage = null;
    targetMostDerivedInterface = null;
    dsiArguments = null;
    dsiResult = null;
    dsiException = null;
    isDynamic = false;
    objectAdapter = null;
    serverRequestId = myORB.getPIHandler().allocateServerRequestId();

    // reset cached attributes:
    cachedArguments = null;
    cachedSendingException = null;
    cachedRequestServiceContexts = null;
    cachedReplyServiceContexts = null;

    startingPointCall = CALL_RECEIVE_REQUEST_SERVICE_CONTEXT;
    intermediatePointCall = CALL_RECEIVE_REQUEST;
    endingPointCall = CALL_SEND_REPLY;
  }
  /** Sets the exception to be returned by received_exception and received_exception_id. */
  protected void setException(Exception exception) {
    super.setException(exception);

    // Make sure DSIException is null because this is the more recent one.
    this.dsiException = null;

    // Clear cached exception value:
    cachedSendingException = null;
  }
 /**
  * Overridden from RequestInfoImpl. Calls the super class, then sets the ending point call
  * depending on the reply status.
  */
 protected void setReplyStatus(short replyStatus) {
   super.setReplyStatus(replyStatus);
   switch (replyStatus) {
     case SUCCESSFUL.value:
       endingPointCall = CALL_SEND_REPLY;
       break;
     case SYSTEM_EXCEPTION.value:
     case USER_EXCEPTION.value:
       endingPointCall = CALL_SEND_EXCEPTION;
       break;
     case LOCATION_FORWARD.value:
     case TRANSPORT_RETRY.value:
       endingPointCall = CALL_SEND_OTHER;
       break;
   }
 }