docs: public void completeBatch(boolean force, BatchListener finalListener) throws SIResourceException
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(this, tc, "completeBatch","force="+force+",finalListener="+finalListener);
  
      _readWriteLock.lockExclusive(); // Lock the batchHandler exclusively
  
      try
      {
        // If force is true we complete the batch even if it isn't full, otherwise
        // we only complete a full batch (it's possible someone else got in before us and completed
        // the old batch before we got the lock).
        if( (force && (_currentBatchSize > 0)) || (_currentBatchSize >= _batchSize))
        {
          Iterator itr = _listeners.iterator();
          while(itr.hasNext())
          {
            BatchListener listener = (BatchListener) itr.next();
            listener.batchPrecommit(_currentTran);
          }
          if(finalListener != null) finalListener.batchPrecommit(_currentTran);
  
          boolean committed = false;
          Exception exceptionOnCommit = null;
  
          try
          {
            _currentTran.commit(); // Commit the current transaction (this'll drive all the CDs)
            committed = true;
          }
          catch(Exception e)
          {
            FFDCFilter.processException(
              e,
              "com.ibm.ws.sib.processor.impl.store.BatchHandler.completeBatch",
              "1:254:1.30",
              this);
  
            committed = false;
  
            SibTr.exception(tc, e);
  
            exceptionOnCommit = e;
          }
  
          // Clear the batch details under the lock
          _currentBatchSize = 0;
          _currentTran = null;
  
          // Commit or Rollback the listeners
          itr = _listeners.iterator();
          while(itr.hasNext())
          {
            BatchListener listener = (BatchListener) itr.next();
  
            if(committed) listener.batchCommitted();
            else listener.batchRolledBack();
  
            itr.remove();
          }
          if(finalListener != null)
          {
            if(committed) finalListener.batchCommitted();
            else finalListener.batchRolledBack();
          }
  
          // If the commit threw an exception, pass it back now
          if(exceptionOnCommit != null)
          {
            //Release exclusive lock on the batch or everything grinds
            //to a halt
            _readWriteLock.unlockExclusive();
  
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(tc, "completeBatch", exceptionOnCommit);
  
            throw new SIResourceException(exceptionOnCommit);
          }
  
          // Ensure any running timer is cancelled
          cancelTimer();
        }
        else  // Nothing transacted to do but still need to call finalListener to cleanup
        {
          if(finalListener != null)
            finalListener.batchCommitted();
        }
      }
      finally
      {
        _readWriteLock.unlockExclusive();
      }
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(this, tc, "completeBatch");
    }