docs: public void beforeCompletion()
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "beforeCompletion");
  
          if (_state != TransactionState.STATE_ACTIVE)
          {
              MessageStoreRuntimeException mre = new MessageStoreRuntimeException(nls.getFormattedMessage("TRAN_PROTOCOL_ERROR_SIMS1001", new Object[]{}, null));
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(tc, "Cannot complete Transaction. Transaction is complete or completing!", mre);
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "beforeCompletion");
              throw mre;
          }
  
          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)
              {
                  FFDCFilter.processException(t, "com.ibm.ws.sib.msgstore.transactions.MSDelegatingLocalTransactionSynchronization.beforeCompletion", "1:103:1.4.1.1", this);
  
                  // An error has occurred during preCommit
                  // so we need to trigger a rollback of our
                  // transaction and therefore our connection
                  // by throwing a runtime exception.
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(tc, "Throwing exception in beforeCompletion to ensure rollback due to Exception in preCommit!", t);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "beforeCompletion");
                  throw new MessageStoreRuntimeException(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)
              {
                  // Call the persistence layer to trigger our
                  // database work on the shared connection.
                  _persistence.beforeCompletion(this);
              }
          }
          catch (PersistenceException pe)
          {
              FFDCFilter.processException(pe, "com.ibm.ws.sib.msgstore.transactions.MSDelegatingLocalTransactionSynchronization.beforeCompletion", "1:134:1.4.1.1", this);
              // An error has occurred during the persistence
              // phase so we need to trigger a rollback of our
              // transaction and therefore our connection by
              // throwing a runtime exception.
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(tc, "Rollback-only set on transaction due to PersistenceException in beforeCompletion!", pe);
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "beforeCompletion");
              throw new MessageStoreRuntimeException(nls.getFormattedMessage("COMPLETION_EXCEPTION_SIMS1002", new Object[] {pe}, null), pe);
          }
          catch (SevereMessageStoreException smse)
          {
              FFDCFilter.processException(smse, "com.ibm.ws.sib.msgstore.transactions.MSDelegatingLocalTransactionSynchronization.beforeCompletion", "1:145:1.4.1.1", this);
              // An error has occurred during the persistence
              // phase so we need to trigger a rollback of our
              // transaction and therefore our connection by
              // throwing a runtime exception.
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(tc, "Rollback-only set on transaction due to PersistenceException in beforeCompletion!", smse);
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "beforeCompletion");
              throw new MessageStoreRuntimeException(nls.getFormattedMessage("COMPLETION_EXCEPTION_SIMS1002", new Object[] {smse}, null), smse);
          }
          
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "beforeCompletion");
      }