if (rQFileLastMod != 0l) { if (log.isDebugEnabled()) { log.debug("Doing forced reread of query files."); } dbp = DBProperties.reReadQueryFile(QUERY_FILE); }
  public PDbBase()    throws SQLException, IOException  {    createLogger();    if (logQueries)      pwlog = new PrintWriter(new FileWriter(getLogName()));    dbp = DBProperties.readQueryFile(QUERY_FILE);    // When was the RQ file last modified?    File rqfile = ConfigFinder.getInstance().locateFile(RecipeComponent.RECIPE_QUERY_FILE);    long newMod = 0l;    if (rqfile != null) {      try {	newMod = rqfile.lastModified();      } catch (SecurityException se) {      }    }    // Only read in the RQ file if it was modified since we last read it in    if (newMod != rQFileLastMod) {      try {	// This next line _always_ re-parses the query file.	dbp.addQueryFile(RecipeComponent.RECIPE_QUERY_FILE);	rQFileLastMod = newMod;      } catch (FileNotFoundException e) {	// This is normal if a user has no separate recipe query file.	if (log.isDebugEnabled()) {	  log.debug("No " + RecipeComponent.RECIPE_QUERY_FILE + " file found.");	}      }    }    //        dbp.setDebug(true);    String database = dbp.getProperty("database");    String username = dbp.getProperty("username");    String password = dbp.getProperty("password");    String dbtype = dbp.getDBType();    String driverParam = "driver." + dbtype;    String driverClass = Parameters.findParameter(driverParam);    if (driverClass == null)      throw new SQLException("Unknown driver " + driverParam);    try {      Class.forName(driverClass);    } catch (ClassNotFoundException cnfe) {      throw new SQLException("Driver class not found: " + driverClass);    }    dbConnection = DBConnectionPool.getConnection(database, username, password);    dbConnection.setAutoCommit(false);    stmt = dbConnection.createStatement();    updateStmt = dbConnection.createStatement();  }