code: public void commit() throws PersistenceException {
          try {
              if( connection == null ) {
                  if( dirty ) {
                      throw new PersistenceException("Attempt to commit a committed or aborted transaction.");
                  }       
                  return;
              }
              state = "COMMITTING";
              try {
                  connection.commit();
                  state = "CLOSING CONNECTIONS";
                  connection.close();
                  connection = null;
                  if (logger.isDebugEnabled()) {
                      logger.debug(connectionCloseLog());
                  }
                  if (tracking) {
                      connections.decrementAndGet();
                  }
                  close();
              }
              catch( SQLException e ) {
                  throw new PersistenceException(e.getMessage());
              }
              finally {
                  if( connection != null ) {
                      logger.warn("Commit failed: " + transactionId);
                      rollback();
                  }
                  dirty = true;
              }
          }
          finally {
          }
      }
docs: Commits the transaction to the database and closes the transaction.
  The transaction should not be used or referenced after calling
  this method.
  @throws org.dasein.persist.PersistenceException either you are trying
  to commit to a used up transaction or a database error occurred
  during the commit