in modules/core/src/main/java/org/apache/savan/atom/AtomDataSource.java [43:74]
public AtomDataSource() throws SavanException {
try {
Class.forName(driver).newInstance();
System.out.println("Loaded the appropriate driver.");
props = new Properties();
props.put("user", "user1");
props.put("password", "user1");
Connection connection = getConnection();
Statement statement = connection.createStatement();
ResultSet feedtable = connection.getMetaData().getTables(null, null, "FEEDS", null);
if (!feedtable.next()) {
statement.execute(SQL_CREATE_FEEDS);
}
ResultSet entirestable = connection.getMetaData().getTables(null, null, "ENTIES", null);
if (!entirestable.next()) {
statement.execute(SQL_CREATE_ENTRIES);
}
connection.close();
} catch (InstantiationException e) {
throw new SavanException(e);
} catch (IllegalAccessException e) {
throw new SavanException(e);
} catch (ClassNotFoundException e) {
throw new SavanException(e);
} catch (SQLException e) {
throw new SavanException(e);
}
}