handler.addLifeCycleListener(new AbstractLifeCycle.AbstractLifeCycleListener() {
@Override
public void lifeCycleStarting(LifeCycle event) {
try {
new WebAppInitializer(getDatabase()).onStartup(handler.getServletContext());
} catch (ServletException e) {
throw new RuntimeException();
}
}
});