public void commit() throws SQLException {
  lock.lock();
  try {
    if (!getAutoCommit()) {
      Statement st=createStatement();
      try {
        st.execute("COMMIT");
      }
  finally {
        st.close();
      }
    }
  }
  finally {
    lock.unlock();
  }
}

public void commit ( ) throws SQLException { lock . lock ( ) ; try { if ( ! getAutoCommit ( ) ) { Statement st = createStatement ( ) ; try { st . execute ( "COMMIT" ) ; } finally { st . close ( ) ; } } } finally { lock . unlock ( ) ; } }
sends commit to the server .
