} catch (SQLException e) {
LOG.warning("The create tables parameter has not been set. Tables and indexes will not be created.");
createTables = false;
}
if (createTables) {
ScriptRunner sr = new ScriptRunner(dataSource.getConnection(), false, false);
sr.setLogWriter(null);
sr.setErrorLogWriter(null);
sr.runScript(new InputStreamReader(this.getClass().getResourceAsStream("/" + createSql)));
if (createSqlInd != null && !createSqlInd.equals("")) {
sr.runScript(new InputStreamReader(this.getClass().getResourceAsStream("/" + createSqlInd)));
} else {
LOG.warning("The script to create indexes has not been set. Indexes will not be created.");
}
}
}