1
0
mirror of synced 2026-08-04 09:17:02 +00:00

Some changes to make it easier to run the sample with the database driver as part of the jetty plugin configuration, preventing classloader leaks.

This commit is contained in:
Luke Taylor
2009-05-05 03:21:07 +00:00
parent 6d655aa514
commit 331a04c07c
2 changed files with 28 additions and 6 deletions
@@ -76,6 +76,18 @@ public class DataSourcePopulator implements InitializingBean {
AuthorityUtils.createAuthorityList("ROLE_IGNORED"));
SecurityContextHolder.getContext().setAuthentication(authRequest);
try {
template.execute("DROP TABLE CONTACTS");
template.execute("DROP TABLE AUTHORITIES");
template.execute("DROP TABLE USERS");
template.execute("DROP TABLE ACL_ENTRY");
template.execute("DROP TABLE ACL_OBJECT_IDENTITY");
template.execute("DROP TABLE ACL_CLASS");
template.execute("DROP TABLE ACL_SID");
} catch(Exception e) {
System.out.println("Failed to drop tables: " + e.getMessage());
}
template.execute(
"CREATE TABLE ACL_SID(" +
"ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 100) NOT NULL PRIMARY KEY," +