code: protected void cleanup() {
  
          final String methodName = "cleanup";
          if (TRACE.isEntryEnabled()) {
              SibTr.entry(this, TRACE, methodName);
          }
  
          if (_unsuccessfulMessages.size() > 0) {
  
              try {
  
                  // 250710: Fix to workaround the problem where failed messages are
                  // unlocked but the retry count is not incremented. Perform a
                  // delete on the messages under a transaction and then roll back
                  // the transaction - this will cause the messages to be unlocked
                  // and have their retry count incremented. If the an exception
                  // is thrown during this processing the messages will remain locked.
                  try
  				{
                  	SIUncoordinatedTransaction localTran = _connection.createUncoordinatedTransaction();
                  	deleteMessages(getMessageHandles(_unsuccessfulMessages), localTran);
                  	localTran.rollback();
  				}
                  catch (SIException ex)
  				{
                      FFDCFilter.processException(ex, CLASS_NAME + "."
                              + methodName, FFDC_PROBE_2, this);
                      if (TRACE.isEventEnabled()) {
                          SibTr.exception(this, TRACE, ex);
                      }
  				}
  //                unlockMessages(_unsuccessfulMessages);
  
              } catch (final ResourceException exception) {
  
                  FFDCFilter.processException(exception, CLASS_NAME + "."
                          + methodName, FFDC_PROBE_1, this);
                  if (TRACE.isEventEnabled()) {
                      SibTr.exception(this, TRACE, exception);
                  }
  
              } finally {
  
                  _unsuccessfulMessages.clear();
  
              }
  
          }
  
          if (TRACE.isEntryEnabled()) {
              SibTr.exit(this, TRACE, methodName);
          }
  
      }
docs: Invoked after all messages in the batch have been delivered. Unlocks any
  unsuccessful messages.