docs: @Override
      public void deliverOrderedMessages(List msgList,
                                         GuaranteedTargetStream targetStream,
                                         int priority,
                                         Reliability reliability)
  
                      throws SIDiscriminatorSyntaxException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(tc, "deliverOrderedMessages",
                          new Object[] { msgList,
                                        targetStream,
                                        new Integer(priority),
                                        reliability });
  
          //Register interest in the current batch
          TransactionCommon tran = _targetBatchHandler.registerInBatch();
  
          // A marker to indicate how far through the method we get. 
          boolean messageAddCall = false;
  
          try
          {
              MessageItem msgItem = null;
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  SibTr.debug(tc, "Get the tick from list of length: " + msgList.size());
  
              // Get the end tick of the last message in the list    
              msgItem = (MessageItem) msgList.get(msgList.size() - 1);
              long endTick = msgItem.getMessage().getGuaranteedValueEndTick();
  
              // This check is done in case the previous batch rolledback 
              // while we were waiting for the batch lock.
              // If this happened then we give up trying to deliver these
              // messages as the previous batch must be redelivered first
              // ( The rollback resets the doubtHorizon to before the 
              // failing batch )
              if (targetStream.getDoubtHorizon() > endTick)
              {
                  int lastSuccessfulMsg = -1;
                  long lastSuccessfulEndTick = -1;
                  long currentEndTick = -1;
                  final int length = msgList.size();
  
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      SibTr.debug(tc, "Process message list of length: " + length);
  
                  // Deliver all messages in list
                  for (int i = 0; i < length; i++)
                  {
                      boolean resetRequired = true;
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                          SibTr.debug(tc, "Deliver message: " + i);
                      try
                      {
                          msgItem = (MessageItem) msgList.get(i);
                          currentEndTick = msgItem.getMessage().getGuaranteedValueEndTick();
  
                          msgItem.setTransacted(true);
  
                          //get the matching results back from the message
                          MessageProcessorSearchResults searchResults = msgItem.getSearchResults();
  
                          deliverToConsumerDispatchers(searchResults, msgItem, tran, false);
  
                          // Remember the last message we successfully delivered (if we break out
                          // of this loop early due to a failure we won't accidently move the
                          // completed prefix past the failed message when the batch is committed)
                          lastSuccessfulMsg = i;
                          lastSuccessfulEndTick = currentEndTick;
  
                          // Remove reset and pooling of search results (we should put this back in at
                          // some point)
  
                          resetRequired = false;
  
                          // Release the JsMessage from the parent MessageItem (Any MessageItemReferences will
                          // have their own references to the JsMessage (unless they've released their's too)
                          msgItem.releaseJsMessage();
                      } catch (SIResourceException e)
                      {
                          // No FFDC code needed
  
                          // There is no need to let SIResourceExceptions go any further than this
                          // method, instead we break out of the for loop to allow any successful
                          // work to be added to the batch. The finally will move the doubtHorizon
                          // back to the correct position.
                          // (The finally will catch any other exception and move the doubt horizon
                          // back but still throw the exception back to the caller)
  
                          // then break out of the for loop to allow any successful work to be added
                          // to the batch.
                          break;
                      } finally
                      {
                          if (resetRequired)
                          {
                              // We've failed to process a message, we can't carry on with this
                              // list of messages instead we move the doubt horizon to point to
                              // the failed message so that we don't accidently ack it if someone
                              // asks. 
                              targetStream.resetDoubtHorizon(currentEndTick);
                          }
                      }
                  } // end of for loop
  
                  if (lastSuccessfulMsg != -1)
                  {
                      // We are about to call the messages Added !
                      messageAddCall = true;
  
                      // Now that we have the Batch lock we are free to get the 
                      // stream lock and update the pending completedPrefix to the
                      // last successful message delivered
                      targetStream.setNextCompletedPrefix(lastSuccessfulEndTick);
  
                      // Add any messages to the batch.
                      // If this fails the batch will be rolled back and the targetStream
                      // rollback listener will be called which will reset the doubtHorizon
                      // to the start of this list of messages, so we don't want an 
                      // SIResourceException to be flowed up the stack.
                      try
                      {
                          _targetBatchHandler.messagesAdded((lastSuccessfulMsg + 1), targetStream);
                      } catch (SIResourceException e)
                      {
                          // No FFDC code needed
  
                          if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                              SibTr.exception(tc, e);
                      }
                  }
              }
          } finally
          {
              // Before exiting this method, need to unlock the batch handler if it was locked.
              if (!messageAddCall)
                  try
                  {
                      _targetBatchHandler.messagesAdded(0);
                  } catch (SIResourceException e)
                  {
                      // No FFDC code needed, This will allow for any exceptions that were thrown to
                      // be rethrown instead of overiding with a batch handler error.
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                          SibTr.exception(tc, e);
                  }
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(tc, "deliverOrderedMessages", new Boolean(messageAddCall));
          }
      }