docs: public void deleteSeen(SITransaction transaction)
    throws SISessionUnavailableException, SISessionDroppedException,
           SIResourceException, SIConnectionLostException, SILimitExceededException,
           SIIncorrectCallException,
           SIErrorException, SIMPMessageNotLockedException
    {
      if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
        SibTr.entry(CoreSPILockedMessageEnumeration.tc, "deleteSeen",
          new Object[] {new Integer(hashCode()), transaction, this});
  
      checkValidState("deleteSeen");
  
      localConsumerPoint.checkNotClosed();
  
      if (transaction != null && !((TransactionCommon)transaction).isAlive())
      {
        SIIncorrectCallException e = new SIIncorrectCallException( nls.getFormattedMessage(
          "TRANSACTION_DELETE_USAGE_ERROR_CWSIP0778",
             new Object[] { consumerSession.getDestinationAddress() },
             null) );
  
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
          SibTr.exception(tc, e);
  
        if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
          SibTr.exit(CoreSPILockedMessageEnumeration.tc, "deleteSeen", e);
  
        throw e;
      }
  
      // if ordered, check that the provided tran is the current tran
      if (localConsumerPoint.getConsumerManager().getDestination().isOrdered() &&
          !localConsumerPoint.getConsumerManager().isNewTransactionAllowed((TransactionCommon) transaction))
      {
        if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
          SibTr.exit(CoreSPILockedMessageEnumeration.tc, "deleteSeen", "Ordering error - Transaction active");
  
        throw new SIIncorrectCallException(
            nls.getFormattedMessage("ORDERED_MESSAGING_ERROR_CWSIP0194",
                new Object[] { localConsumerPoint.getConsumerManager().getDestination().getName(),
                localConsumerPoint.getConsumerManager().getMessageProcessor().getMessagingEngineName()},
                null));
      }
  
      LocalTransaction localTransaction = null;
      int deletedActiveMessages = 0;
      SIMPMessageNotLockedException notLockedException = null;
      int notLockedExceptionMessageIndex = 0;
  
      synchronized(this)
      {
        if(currentUnlockedMessage != null)
        {
          removeMessage(currentUnlockedMessage);
          currentUnlockedMessage = null;
        }
        messageAvailable = false;
  
        if(firstMsg != null)
        {
          // Make the array atleast the size of the number of locked msgs
          SIMessageHandle[] messageHandles = new SIMessageHandle[getNumberOfLockedMessages()];
          LMEMessage pointerMsg = firstMsg;
  
          LMEMessage removedMsg;
          LMEMessage endMsg;
  
          // There are two reasons for the currentMsg to be null, either it hasn't
          // been used jet and therefore nothing has been 'seen' so nothing for us
          // to do or it's moved off the end of the list in which case we delete
          // the whole list
          if((currentMsg == null) && endReached)
            endMsg = lastMsg;
          else
            endMsg = currentMsg;
  
          if(endMsg != null)
          {
            TransactionCommon tranImpl = (TransactionCommon)transaction;
            boolean more = true;
  
            if(tranImpl != null)
              tranImpl.registerCallback(pointerMsg.message);
  
            while(more)
            {
              if(pointerMsg == endMsg)
                more = false;
  
              // If the message is in the MS we need to remove it
              if(pointerMsg.isStored)
              {
                // Create a local tran if we weren't given one
                if(tranImpl == null)
                {
                  localTransaction = txManager.createLocalTransaction(!isRMQ());
                  tranImpl = localTransaction;
                  tranImpl.registerCallback(pointerMsg.message);
                }
  
                try
                {
                  removeMessageFromStore(pointerMsg.message,
                                         tranImpl,
                                         true); // true = decrement active message count (on commit)
                }
                catch (SIMPMessageNotLockedException e)
                {
                  // No FFDC code needed
                  SibTr.exception(tc, e);
                  // See defect 387591
                  // We should only get this exception if the message was deleted via
                  // the controllable objects i.e. the admin console. If we are here for
                  // another reason that we have a real error.
  
                  SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                      new Object[] {
                      "com.ibm.ws.sib.processor.impl.AbstractLockedMessageEnumeration",
                      "1:1081:1.154.3.1",
                      e });
  
                  // Place the problem messagehandle in the array
                  messageHandles[notLockedExceptionMessageIndex] = pointerMsg.getJsMessage().getMessageHandle();
                  notLockedExceptionMessageIndex++;
  
                  notLockedException = e;
  
  //              Because we couldn't do the remove we wouldn't get the callback on the
                  // afterCompletion to removeActiveMessages so we should do it here now
                  if (localTransaction != null)
                    deletedActiveMessages++;
                }
              }
              // If the message wasn't stored we need to decrement the count now, but we can't
              // while we hold the LME lock.
              else
                deletedActiveMessages++;
  
              removedMsg = pointerMsg;
              pointerMsg = pointerMsg.next;
              removeMessage(removedMsg);
            }
          }
        }
      } // synchronized
  
      // Now we've released the lock we can decrement the active message count (which
      // may resume the consumer)
      if(deletedActiveMessages != 0)
        localConsumerPoint.removeActiveMessages(deletedActiveMessages);
  
      // Commit outside of the lock - it may be expensive and we may need other locks
      // if we fail and events are driven on the messages
      if(localTransaction != null)
      {
        localTransaction.commit();
      }
  
      if (notLockedException != null)
      {
        if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
          SibTr.exit(CoreSPILockedMessageEnumeration.tc, "deleteSeen", this);
  
        throw notLockedException;
      }
  
      if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
        SibTr.exit(CoreSPILockedMessageEnumeration.tc, "deleteSeen", this);
    }