protected final ResultSet execute() throws SQLException {
  connection=createConnection();
  setInternalConnection(connection);
  statement=null;
  try {
    ResultSet result=runQuery(connection);
    assert (null != statement);
    return result;
  }
 catch (  SQLException e) {
    LOG.warning("Failed to execute: " + sql + " because: "+ e.getMessage());
    closeResources();
    connection=null;
    statement=null;
    throw e;
  }
}

protected final ResultSet execute ( ) throws SQLException { connection = createConnection ( ) ; setInternalConnection ( connection ) ; statement = null ; try { ResultSet result = runQuery ( connection ) ; assert ( null != statement ) ; return result ; } catch ( SQLException e ) { LOG . warning ( "Failed to execute: " + sql + " because: " + e . getMessage ( ) ) ; closeResources ( ) ; connection = null ; statement = null ; throw e ; } }
execute the command that ' s defined by the subclass following the command pattern . specialized parameters are held in the command instances .
