private void initSqlQueries(Connection conn,String sqlFileUrl) throws Exception {
  try {
    File sqlFile;
    try {
      sqlFile=fileSystem.getFile(sqlFileUrl);
      sqlFileUrl=null;
    }
 catch (    Exception e) {
      serviceLog.error(e.getMessage(),e);
      throw e;
    }
    sqlQueries.init(sqlFile.getCanonicalFile(),"GreyList",conn,sqlParameters);
    selectQuery=sqlQueries.getSqlString("selectQuery",true);
    insertQuery=sqlQueries.getSqlString("insertQuery",true);
    deleteQuery=sqlQueries.getSqlString("deleteQuery",true);
    deleteAutoWhiteListQuery=sqlQueries.getSqlString("deleteAutoWhitelistQuery",true);
    updateQuery=sqlQueries.getSqlString("updateQuery",true);
  }
  finally {
    theJDBCUtil.closeJDBCConnection(conn);
  }
}

private void initSqlQueries ( Connection conn , String sqlFileUrl ) throws Exception { try { File sqlFile ; try { sqlFile = fileSystem . getFile ( sqlFileUrl ) ; sqlFileUrl = null ; } catch ( Exception e ) { serviceLog . error ( e . getMessage ( ) , e ) ; throw e ; } sqlQueries . init ( sqlFile . getCanonicalFile ( ) , "GreyList" , conn , sqlParameters ) ; selectQuery = sqlQueries . getSqlString ( "selectQuery" , true ) ; insertQuery = sqlQueries . getSqlString ( "insertQuery" , true ) ; deleteQuery = sqlQueries . getSqlString ( "deleteQuery" , true ) ; deleteAutoWhiteListQuery = sqlQueries . getSqlString ( "deleteAutoWhitelistQuery" , true ) ; updateQuery = sqlQueries . getSqlString ( "updateQuery" , true ) ; } finally { theJDBCUtil . closeJDBCConnection ( conn ) ; } }
initializes the sql query environment from the sqlresources file . will look for conf / sqlresources . xml .
