protected void tearDown() throws Exception {
Statement statement = null;
Connection con = null;
Settings settings = null;
ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder()
.applySettings( getConfiguration().getProperties() )
.build();
try {
settings = getConfiguration().buildSettings(serviceRegistry);
con = serviceRegistry.getService(JdbcServices.class).getConnectionProvider().getConnection();
statement = con.createStatement();
statement.execute("drop table Session_attributes");
statement.execute("drop table Users");
statement.execute("drop table Groups");
con.commit();
} finally {
if (statement!=null) statement.close();
serviceRegistry.getService(JdbcServices.class).getConnectionProvider().closeConnection(con);
}
super.tearDown();
}