docs: private void removeUnwantedMsgs(List<SIMPMessage> unwantedMsgList, TransactionCommon tran) throws SIResourceException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(tc, "removeUnwantedMsgs", new Object[] { this, unwantedMsgList, tran });
  
          LocalTransaction localTran = null;
          Transaction msTran = null;
          if (tran == null)
          {
              localTran = _txManager.createLocalTransaction(true);
              msTran = (Transaction) localTran;
          }
          else
          {
              msTran =
                              _messageProcessor.resolveAndEnlistMsgStoreTransaction(tran);
          }
  
          //We iterate through all the message that were marked for deletion and delete them.
          //Under the transaction we created
          Iterator<SIMPMessage> it = unwantedMsgList.iterator();
          while (it.hasNext())
          {
              // Remove the ineligible message from the itemstream
              try
              {
                  SIMPMessage unwanted = it.next();
  
                  unwanted.remove(
                                  msTran,
                                  _consumerKey.getGetCursor(unwanted).getLockID());
              } catch (MessageStoreException e)
              {
                  // MessageStoreException shouldn't occur so FFDC.
                  FFDCFilter.processException(
                                              e,
                                              "com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint.removeUnwantedMsgs",
                                              "1:1340:1.22.5.1",
                                              this);
  
                  SibTr.exception(tc, e);
  
                  SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0003",
                              new Object[] {
                                            "com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint",
                                            "1:1348:1.22.5.1",
                                            SIMPUtils.getStackTrace(e),
                                            _consumerDispatcher.getDestination().getName() });
  
                  //deactivate this consumer
                  _waiting = false;
                  unsetReady();
  
                  //Rethrow the exception
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                      SibTr.exit(tc, "removeUnwantedMsgs", e);
  
                  throw new SIResourceException(
                                  nls.getFormattedMessage(
                                                          "INTERNAL_MESSAGING_ERROR_CWSIP0003",
                                                          new Object[] {
                                                                        "com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint",
                                                                        "1:1365:1.22.5.1",
                                                                        e,
                                                                        _consumerDispatcher.getDestination().getName() },
                                                          null),
                                  e);
              }
          }
  
          try
          {
              // Commit the deletion of the ineligible messages (if we have our own transaction)
              if (localTran != null)
              {
                  localTran.commit();
              }
          } catch (SIException e)
          {
              // MessageStoreException shouldn't occur so FFDC.
              FFDCFilter.processException(
                                          e,
                                          "com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint.removeUnwantedMsgs",
                                          "1:1387:1.22.5.1",
                                          this);
  
              SibTr.exception(tc, e);
  
              //deactivate this consumer
              _waiting = false;
              unsetReady();
  
              //Rollback the transaction if something went wrong
              //If there were no eligible messages on the itemstream
  
              try
              {
                  localTran.rollback();
              } catch (SIException ee)
              {
                  FFDCFilter.processException(
                                              ee,
                                              "com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint.removeUnwantedMsgs",
                                              "1:1408:1.22.5.1",
                                              this);
  
                  SibTr.exception(tc, e);
  
                  SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                              new Object[] {
                                            "com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint",
                                            "1:1416:1.22.5.1",
                                            SIMPUtils.getStackTrace(ee) });
  
                  //Rethrow the exception
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                      SibTr.exit(tc, "removeUnwantedMsgs", ee);
  
                  throw new SIResourceException(
                                  nls.getFormattedMessage(
                                                          "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                          new Object[] {
                                                                        "com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint",
                                                                        "1:1428:1.22.5.1",
                                                                        ee },
                                                          null),
                                  ee);
              }
  
              //Rethrow the exception
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  SibTr.exit(tc, "removeUnwantedMsgs", e);
  
              SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                          new Object[] {
                                        "com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint",
                                        "1:1441:1.22.5.1",
                                        SIMPUtils.getStackTrace(e) });
  
              throw new SIResourceException(
                              nls.getFormattedMessage(
                                                      "INTERNAL_MESSAGING_ERROR_CWSIP0002",
                                                      new Object[] {
                                                                    "com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint",
                                                                    "1:1449:1.22.5.1",
                                                                    e },
                                                      null),
                              e);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "removeUnwantedMsgs");
      }