docs: public void commitLocalTransaction() throws IllegalStateException,
              LocalTransactionException, ResourceException, SIException,
              SIErrorException {
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.entry(this, TRACE, "commitLocalTransaction");
          }
  
          if (_sessionClosed) {
              throw new IllegalStateException(NLS.getFormattedMessage(
                      ("ILLEGAL_STATE_CWSJR1132"),
                      new Object[] { "commitLocalTransaction"}, null));
          }
          if (_sessionInvalidated) {
              throw new IllegalStateException(NLS.getFormattedMessage(
                      ("ILLEGAL_STATE_CWSJR1136"),
                      new Object[] { "commitLocalTransaction"}, null));
          }
          if (!getTransacted()) {
              throw new LocalTransactionException(NLS.getFormattedMessage(
                      ("ILLEGAL_STATE_CWSJR1125"),
                      new Object[] { "commitLocalTransaction"}, null));
          }
  
          if (_applicationLocalTransaction == null) {
  
              if (_connection.getConnectionFactory().isManaged()) {
  
                  final SITransaction transaction = getManagedConnection()
                          .getCurrentTransaction(
                                  _connection.getConnectionManager());
  
                  if (transaction != null) {
  
                      // PK57931 if transaction is a local tran and _applicationLocalTransaction is null
                      // this means someone else created the local tran
                      if (transaction instanceof SIUncoordinatedTransaction) {
                           if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                               SibTr.debug(TRACE, "_applicationLocalTransaction was null but current tran is local.  Committing local tran.");
                           }
                           ((SIUncoordinatedTransaction)transaction).commit();
                      } else {
                          // transaction is a global tran but this method is commitLocalTransaction
                          throw new LocalTransactionException(NLS
                                  .getFormattedMessage(("ILLEGAL_STATE_CWSJR1138"),
                                          new Object[] { "commitLocalTransaction"},
                                          null));
                      }
                  }
  
              }
  
              // Quietly do nothing if we don't have a global or container local
              // transaction and we are transacted (the application local
              // transaction has not yet been created).
  
          } else {
  
              try {
  
                  _applicationLocalTransaction.commit();
  
              } catch (SIRollbackException rolledbackException)   {
  
                  // No FFDC code needed
  
                  // The commit failed with a rollback exception so inform the
                  // connection manager (vai the managed connection) that the
                  // transaction has been rolled back. Then reset the transaction
                  // to null so we don't need to roll it back when the session
                  // is closed.
                  if (_connection.getConnectionFactory().isManaged()) {
                      _managedConnection.localTransactionRolledBack();
                  }
  
                  _applicationLocalTransaction = null;
  
                  if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                      SibTr.exception(this, TRACE, rolledbackException);
                  }
  
                  throw rolledbackException;
  
              } catch (final SIException exception) {
  
                  FFDCFilter.processException(exception, CLASS_NAME
                          + ".commitLocalTranaction", "1:473:1.47", this);
                  if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                      SibTr.exception(this, TRACE, exception);
                  }
                  throw exception;
  
              } catch (final SIErrorException exception) {
  
                  FFDCFilter.processException(exception, CLASS_NAME
                          + ".commitLocalTranaction", "1:482:1.47", this);
                  if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                      SibTr.exception(this, TRACE, exception);
                  }
                  throw exception;
  
              }
  
              if (_connection.getConnectionFactory().isManaged()) {
                  _managedConnection.localTransactionCommitted();
              }
  
              _applicationLocalTransaction = null;
  
          }
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.exit(this, TRACE, "commitLocalTransaction");
          }
  
      }