docs: public void reallocateMsgs(DestinationHandler destination, boolean allMsgs, boolean forceRemove) throws SIResourceException 
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(tc, "reallocateMsgs", 
        new Object[]{this.toString(), destination, new Boolean(allMsgs), new Boolean(forceRemove)});  
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.debug(tc, "Reallocating messages queued for " + destination.getName() + " from ME " + messageProcessor.getMessagingEngineUuid() + " to ME " + targetMEUuid);
      
      //Attempt to reallocate the messages to another localisation of the destination,
      //or to the exception destination, or discard the messages.
  
      ExceptionDestinationHandlerImpl exceptionDestinationHandlerImpl = null;
      LocalTransaction transaction = null;
      int transactionSize = -1;
      
      // PK57432 We are able to send messages, unless we encounter a guess on any stream
      // (a guess on one stream will mean all other streams would also get guesses).
      boolean streamCanSendMsgs = true;
      
      // Obtain and release an exclusive lock on the destination to ensure a
      // send is not taking place
      LockManager reallocationLock = 
        ((BaseDestinationHandler)destination).getReallocationLockManager();
      reallocationLock.lockExclusive();
      // Release Lock
      reallocationLock.unlockExclusive();    
     
      synchronized(this) 
      {
        StreamSet streamSet = sourceStreamManager.getStreamSet();
    
        if (streamSet == null) 
        {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "reallocateMsgs");
          return;
        } 
        
        Iterator stream_it = streamSet.iterator();
        
        //Iterate over all streams in the stream set
        while(stream_it.hasNext())
        {
          transactionSize = 0;
          transaction = destination.getTxManager().createLocalTransaction(false);
          
          SourceStream stream = (SourceStream) stream_it.next(); 
      
          // We need to leave the stream in the same guess state as it started
          // in, otherwise, if we incorrectly change it from 'guesses' to
          // 'no guesses' any other thread currently halfway through processing
          // a message may incorrectly think that it can send a message - this
          // leaves the message locked to this OutputHandler and cannot be
          // reallocated later.
          boolean streamStateChecked = false;
          boolean oldGuessState = stream.containsGuesses();
          
          // prevent the stream from sending any more messages while
          // we are reallocating. This avoids the need to lock the 
          // stream      
          stream.guessesInStream();  
    
          
          // Obtain a list of all messages which are in the stream
          // but have not yet been sent, or all the messages in the 
          // stream if we have been asked to reallocate everything
          List indexList = null;
          if( allMsgs == true)
            indexList = stream.getAllMessagesOnStream();
          else
            indexList = stream.getMessagesAfterSendWindow();
    
          ArrayList<SIMPMessage> markedForSilence = new ArrayList<SIMPMessage>();
          Iterator indexList_it = indexList.iterator();
    
          // Populate msgList with messages indexed in indexList
          long index = -1;
          while (indexList_it.hasNext())
          {
            index = ((Long)indexList_it.next()).longValue();
            MessageItem msg = null;
            
            try
            {
              msg = (MessageItem) transmissionItemStream.findById(index);
            }
            catch (MessageStoreException e)
            {
              // FFDC
              FFDCFilter.processException(
                e,
                "com.ibm.ws.sib.processor.impl.PtoPOutputHandler.reallocateMsgs",
                "1:2168:1.241",
                this);
                
              SibTr.exception(tc, e);
              
              try
              {
                // Attempt to rollback any outstanding tran
                transaction.rollback();
              }
              catch(SIException ee)
              {
                // No FFDC code needed
                SibTr.exception(tc, ee);
              }          
              
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(tc, "reallocateMsgs", e);
              
              return;
            }
            // Check for null (message expired)
            if (msg!=null)
            {
              streamStateChecked = true;
              
              // It's possible that the message was sent to an alias that mapped
              // to this destination, in which case we need to take into account any
              // scoped ME sets
              DestinationHandler scopingDestination = destination;
              
              // For each message we need to reallocate
              OutputHandler outputHandler = null;
              
              streamCanSendMsgs = false;  //assume that the existing stream cannot
              
              boolean removeMsg = true; //we assume that we will remove the message from
                                //the item stream and write silence into the src stream
              
              boolean sendToInputHandler = false; 
              boolean newStreamIsGuess = false;       
              if (!destination.isToBeDeleted())
              {
                
                  // If this message has a routingDestination set in it it may be
                  // because the message was fixed on a specific ME or set of MEs.
                  // Pull out the ME to use in the reallocation decision.
                  SIBUuid8 fixedME = null;
                  JsDestinationAddress routingDestinationAddr = msg.getMessage().getRoutingDestination();
                  if(routingDestinationAddr != null)
                  {
                    // Pull out any fixed ME
                    fixedME = routingDestinationAddr.getME();
                    
                    // If we're not fixed then check to see if we were sent to an alias, and if
                    // so use that for routing from now on.
                    if(fixedME == null)
                    {
                      DestinationHandler routingDestHandler;
                      try
                      {
                        routingDestHandler = 
                          messageProcessor.getDestinationManager().getDestination(routingDestinationAddr, false);
                        if(routingDestHandler.isAlias())
                        {
                          scopingDestination = routingDestHandler;
                        }
                      }
                      catch (SIException e)
                      {
                        // No FFDC code needed        
                        if (TraceComponent.isAnyTracingEnabled())
                          SibTr.exception(tc, e);
    
                        // If we can't find the alias destination then we've missed our chance
                        // to scope the message. This is acceptable - there is no guarantee on
                        // message scoping if the config changes after sending the message so
                        // ignore this and use the original destination.
                      }
                    }
                  }
                  
                  //Obtain an output handler for this destination  
                  outputHandler = scopingDestination.
                    choosePtoPOutputHandler(fixedME,
                                            transmissionItemStream.getLocalizingMEUuid(), // preferred ME                                           
                                           (!msg.isFromRemoteME()), false, null);
    
                  if(outputHandler!=null)
                  {
                    newStreamIsGuess = outputHandler.isWLMGuess();
                    //determine if this is a new output handler or not
                    if(outputHandler==this)
                    {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        SibTr.debug(tc, "Leaving message " + msg.getMessage().getSystemMessageId() +
                                          " on this stream (" + newStreamIsGuess + ")");
                      
                      // PK57432 WLM may have guessed to come to this conclusion,
                      // because all candidates are unavailable.
                      // We should not attempt to transmit the messages in this case.
                      streamCanSendMsgs = ! newStreamIsGuess; 
    
                      removeMsg = false;  //msg is in the correct place so we
                                          //do not need to remove it
    
                      // If WLM has re-chosen this OutputHandler it means either:
                      //  a) The target is now available
                      //  b) The target is unavailable but there are no other available targets
                      //     (otherwise it would have chosen one of those instead)
                      // In either case WLM with always return the same choice for every message
                      // on this stream so there is no benefit in continuing to iterate through
                      // the msgs as they will all stay on this stream.
                      
                      if(fixedME == null && scopingDestination.equals(destination)) 
                      {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                          SibTr.debug(tc, "Exiting reallocate due to no better options");
    
                        //If WLM guessed the same handler without any restriction being
                        //forced onto it but we're not able to re-send the messages
                        // then exit the msg loop as there's no point reallocating more
                        // messages on this stream after a guess.
                        break;
                      }
                    }
                    else
                    {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        SibTr.debug(tc, "Reallocating message " + msg.getMessage().getSystemMessageId() + " to alternative ME");
                      
                      // WLM chose an alternative outputhandler so get the inputhandler
                      // and resend the message to it (allowing for the preferredME)
                      sendToInputHandler = true;
                    }
                  }//end if outputHandler!=null
                  else
                  {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      SibTr.debug(tc, "Leaving message " + msg.getMessage().getSystemMessageId() +
                                        " on this stream due to no OutputHandler!");
    
                    removeMsg = false; // No output handler but that doesnt mean we remove the msg
                  }
                
              } 
              else
              {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  SibTr.debug(tc, "Discarding message " + msg.getMessage().getSystemMessageId() + " due to deleted queue");
    
                if (!messageProcessor.discardMsgsAfterQueueDeletion())
                {
                  /*
                   * The destination is being removed so messages should be moved to the exception destination
                   */
                   
                  if (exceptionDestinationHandlerImpl == null)
                  {
                    //Create an exception destination handler
                    exceptionDestinationHandlerImpl = 
                       (ExceptionDestinationHandlerImpl) messageProcessor.createExceptionDestinationHandler(null);
       
                  }
                  
                  String destName = destinationHandler.getName();
                  if(destinationHandler.isLink())
                    destName = ((LinkHandler)destinationHandler).getBusName();
                  
                  final UndeliverableReturnCode rc = 
                     exceptionDestinationHandlerImpl.handleUndeliverableMessage(msg
                                                                            ,transaction
                                                                            ,SIRCConstants.SIRC0032_DESTINATION_DELETED_ERROR
                                                                            ,new String[] {destName,
                                                                                           messageProcessor.getMessagingEngineName()}
                                                                           );
                 
                  if (rc == UndeliverableReturnCode.ERROR || rc == UndeliverableReturnCode.BLOCK)
                  {
                    // Messages could not be moved so dont bother trying the rest. Just flag an error.
                    
                    SIErrorException e = new SIErrorException(nls.getFormattedMessage(
                        "DESTINATION_DELETED_ERROR_CWSIP0550",
                        new Object[] { destinationHandler.getName(), destinationHandler.getUuid().toString() },
                        null));
    
                    FFDCFilter.processException(
                      e,
                      "com.ibm.ws.sib.processor.impl.PtoPOutputHandler.reallocateMsgs",
                      "1:2372:1.241",
                      this);
                    
                    SibTr.exception(tc, e);
                    
                    removeMsg = false;
                    break;
                  }
                   
                  transactionSize++;
                }
                // else remove will be true 
              } 
              
              if(sendToInputHandler)
              {
                // send this message to a new input handler 
                InputHandler inputHandler = scopingDestination.getInputHandler(ProtocolType.UNICASTINPUT,
                                                                               null,
                                                                               msg.getMessage());
                try
                {
                  JsMessage message = msg.getMessage().getReceived();
                  
                  MessageItem messageItem = new MessageItem(message);
                  
                  // Copy across the original message's prefer local setting
                  messageItem.setPreferLocal(msg.preferLocal());
    
                  inputHandler.handleMessage(messageItem, 
                                             transaction, 
                                             messageProcessor.getMessagingEngineUuid());
                  transactionSize++;
                }
                catch (SIException e)
                {
                  // No FFDC code needed        
                  handleReallocationFailure(e, destination, transaction);   
                } 
                catch (MessageCopyFailedException e)
                {
                  // No FFDC code needed
                  handleReallocationFailure(e, destination, transaction);                
                }
              }          
              
              // Remove message from itemstream
              if (removeMsg || forceRemove )
              {
                
                Transaction msTran = messageProcessor.resolveAndEnlistMsgStoreTransaction(transaction);
                try
                {
                  // remove it from this itemstream
                  msg.remove(msTran, msg.getLockID());
                  transactionSize++;  
                  markedForSilence.add(msg);             
                }
                catch(MessageStoreException e)
                {
                  // No FFDC code needed
                  handleReallocationFailure(e, destination, transaction);
                }          
              }
              
              // Batch up the transactional operations.
              if (transactionSize > SIMPConstants.REALLOCATION_BATCH_SIZE)
              {
                //Commit the transaction and start another one
                try
                {
                  transaction.commit();
                  transaction = destination.getTxManager().createLocalTransaction(false);
                  transactionSize = 0;
                  
                  // Turn markedForSilence to silence
                  Iterator<SIMPMessage> markedForSilence_it = markedForSilence.iterator();
                  while(markedForSilence_it.hasNext())
                  {
                    SIMPMessage silenceMsg = markedForSilence_it.next();
                    stream.writeSilenceForced(silenceMsg);
                  }
                  // reset markedForSilence
                  markedForSilence = new ArrayList<SIMPMessage>();
                  
                } catch (SIException e)
                {
                  // No FFDC code needed
                  handleReallocationFailure(e, destination, transaction);                                                                        
                }
              }
            }
          }
          
          // Commit transaction
          try
          {
            transaction.commit();    
                    
            // Turn markedForSilence to silence
            Iterator<SIMPMessage> markedForSilence_it = markedForSilence.iterator();
            while(markedForSilence_it.hasNext())
            {
              SIMPMessage silenceMsg = markedForSilence_it.next();
              stream.writeSilenceForced(silenceMsg);
            }
                
          } 
          catch (SIException e)
          {
            // No FFDC code needed
            handleReallocationFailure(e, destination, transaction);
          }
          
          // If there weren't any messages driven to re-calculate the guess state of the stream,
          // make sure the stream is set back to how it was before we started.
          if(!streamStateChecked)
        	  streamCanSendMsgs = !oldGuessState;
                  
          // Drive the transmit of the remaining messages on the stream
          if (streamCanSendMsgs)
            stream.noGuessesInStream();      
        }
      }
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "reallocateMsgs");
    }