docs: public void commit() throws SIIncorrectCallException, SIRollbackException, SIResourceException, SIErrorException
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "commit");
  
          if (_state != TransactionState.STATE_ACTIVE)
          {
              SIIncorrectCallException sie = new SIIncorrectCallException(nls.getFormattedMessage("CANNOT_COMMIT_COMPLETE_SIMS1004", new Object[]{}, null));
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Cannot commit Transaction. Transaction is complete or completing!", sie);
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "commit");
              throw sie;
          }
  
          for (int i = 0; i < _callbacks.size(); i++)
          {
              TransactionCallback callback = (TransactionCallback) _callbacks.get(i);
              callback.beforeCompletion(this);
          }
  
          // Do we have work to do?
          if (_workList != null)
          {
              try
              {
                  _workList.preCommit(this);
              }
              catch (Throwable t)
              {
                  com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.sib.msgstore.transactions.MSDelegatingLocalTransaction.commit", "1:363:1.51.1.14", this);
  
                  // An error has occurred during preCommit
                  // so we need to rollback and throw a
                  // RollbackException
                  try
                  {
                      // When we throw our RollbackException the TM is
                      // going to assume we are complete so we need to
                      // ensure we are rolled-back.
                      rollback();
                  }
                  catch (Exception e)
                  {
                      com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.sib.msgstore.transactions.MSDelegatingLocalTransaction.commit", "1:377:1.51.1.14", this);
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Exception caught rolling-back transaction after preCommit failure!", e);
                  }
  
                  // Mark ourselves as complete and inform
                  // the TM that we have rolled-back.
                  _state = TransactionState.STATE_ROLLEDBACK;
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Transaction rolled-back due to Exception in preCommit!", t);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "commit");
                  throw new SIRollbackException(nls.getFormattedMessage("COMPLETION_EXCEPTION_SIMS1002", new Object[] {t}, null), t);
              }
          }
  
          // Need to change the state after we have
          // called the callbacks and preCommitted
          // the workList as they may trigger
          // an addWork call to add work to the
          // transaction.
          _state = TransactionState.STATE_COMMITTING_1PC;
  
          try
          {
              // Do we have work to do?
              if (_workList != null)
              {
                  _persistence.commit(this, true);
  
                  _workList.commit(this);
              }
  
              _state = TransactionState.STATE_COMMITTED;
          }
          catch (SeverePersistenceException spe)
          {
              com.ibm.ws.ffdc.FFDCFilter.processException(spe, "com.ibm.ws.sib.msgstore.transactions.MSDelegatingLocalTransaction.commit", "1:411:1.51.1.14", this);
  
              // As we have thrown a severe exception we need to inform
              // the ME that this instance is no longer able to continue.
              if (_ms != null)
              {
                  _ms.reportLocalError();
              }
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Unrecoverable persistence exception caught during commit phase of transaction!", spe);
              throw new SIResourceException(nls.getFormattedMessage("COMPLETION_EXCEPTION_SIMS1002", new Object[] {spe}, null), spe);
          }
          catch (PersistenceException pe)
          {
              com.ibm.ws.ffdc.FFDCFilter.processException(pe, "com.ibm.ws.sib.msgstore.transactions.MSDelegatingLocalTransaction.commit", "1:425:1.51.1.14", this);
  
              // The persistence layer has had a problem
              // so we need to rollback our in memory model
              // as we can't ensure our data's integrity.
              try
              {
                  // When we throw our RollbackException the TM is
                  // going to assume we are complete so we need to
                  // ensure we are rolled-back.
                  _workList.rollback(this);
  
                  _state = TransactionState.STATE_ROLLEDBACK;
              }
              catch (Throwable t)
              {
                  com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.sib.msgstore.transactions.MSDelegatingLocalTransaction.commit", "1:441:1.51.1.14", this);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Exception caught rolling-back WorkList after Commit failure!", t);
              }
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Transaction rolled-back due to Exception in Commit!", pe);
              throw new SIRollbackException(nls.getFormattedMessage("COMPLETION_EXCEPTION_SIMS1002", new Object[] {pe}, null), pe);
          }
          catch (Throwable t)
          {
              com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.sib.msgstore.transactions.MSDelegatingLocalTransaction.commit", "1:450:1.51.1.14", this);
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Exception caught during commit phase of transaction!", t);
              throw new SIErrorException(nls.getFormattedMessage("COMPLETION_EXCEPTION_SIMS1002", new Object[] {t}, null), t);
          }
          finally
          {
              // We always ensure that all afterCompletion
              // callbacks are called even in the case of
              // rollback.
              boolean committed = (_state == TransactionState.STATE_COMMITTED);
  
              // Defect 316887
              try
              {
                  if (_workList != null)
                  {
                      _workList.postComplete(this, committed);
                  }
  
                  for (int i = 0; i < _callbacks.size(); i++)
                  {
                      TransactionCallback callback = (TransactionCallback) _callbacks.get(i);
                      callback.afterCompletion(this, committed);
                  }
              }
              catch (Throwable t)
              {
                  com.ibm.ws.ffdc.FFDCFilter.processException(t, "com.ibm.ws.sib.msgstore.transactions.MSDelegatingLocalTransaction.commit", "1:477:1.51.1.14", this);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Exception caught during post commit phase of transaction!", t);
                  // We aren't going to rethrow this exception as if
                  // a previous exception has been thrown outside the
                  // finally block it is likely to have more
                  // information about the root problem.
              }
  
  
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "commit");
          }
      }