code: public void commit()
      {
          checkOpen();
          try
          {
              prepareCommit();
              checkForCommit();
  
              txStatus = Status.STATUS_COMMITTING;
              if (log.isDebugEnabled()) log.debug("Commit transaction " + this);
              // now do real commit on broker
              if(hasBroker()) getBroker().commitTransaction();
  
              // Now, we notify everything the commit is done.
              performTransactionAwareAfterCommit();
  
              doClose();
              txStatus = Status.STATUS_COMMITTED;
          }
          catch(Exception ex)
          {
              log.error("Error while commit objects, do abort tx " + this + ", " + ex.getMessage(), ex);
              txStatus = Status.STATUS_MARKED_ROLLBACK;
              abort();
              if(!(ex instanceof ODMGRuntimeException))
              {
                  throw new TransactionAbortedExceptionOJB("Can't commit objects: " + ex.getMessage(), ex);
              }
              else
              {
                  throw (ODMGRuntimeException) ex;
              }
          }
      }
docs: Commit and close the transaction. Calling <code>commit</code> commits to
  the database all persistent object modifications within the transaction and
  releases any locks held by the transaction. A persistent object
  modification is an update of any field of an existing persistent object, or
  an update or creation of a new named object in the database. If a
  persistent object modification results in a reference from an existing
  persistent object to a transient object, the transient object is moved to
  the database, and all references to it updated accordingly. Note that the
  act of moving a transient object to the database may create still more
  persistent references to transient objects, so its referents must be
  examined and moved as well. This process continues until the database
  contains no references to transient objects, a condition that is guaranteed
  as part of transaction commit. Committing a transaction does not remove
  from memory transient objects created during the transaction.
  
  The updateObjectList contains a list of all objects for which this transaction
  has write privledge to.  We need to update these objects.