code: public synchronized void commitTransaction() throws TransactionNotInProgressException, TransactionAbortedException
      {
          if (!isInTransaction())
          {
              throw new TransactionNotInProgressException("PersistenceBroker is NOT in transaction, can't commit");
          }
          fireBrokerEvent(BEFORE_COMMIT_EVENT);
          setInTransaction(false);
          clearRegistrationLists();
          referencesBroker.removePrefetchingListeners();
          /*
          arminw:
          In managed environments it should be possible to close a used connection before
          the tx was commited, thus it will be possible that the PB instance is in PB-tx, but
          the connection is already closed. To avoid problems check if CM is in local tx before
          do the CM.commit call
          */
          if(connectionManager.isInLocalTransaction())
          {
              this.connectionManager.localCommit();
          }
          fireBrokerEvent(AFTER_COMMIT_EVENT);
      }
docs: Commit and close the transaction.
  Calling <code>commit</code> commits to the database all
  UPDATE, INSERT and DELETE statements called within the transaction and
  releases any locks held by the transaction.
  If beginTransaction() has not been called before a
  TransactionNotInProgressException exception is thrown.
  If the transaction cannot be commited a TransactionAbortedException exception is thrown.