use of org.apache.openmeetings.util.OMContextListener in project openmeetings by apache.
the class ApplicationHelper method initApp.
private static WebApplication initApp(WebApplication app) {
if (app != null) {
try {
app.getServletContext();
} catch (IllegalStateException e) {
app.setServletContext(new MockServletContext(app, null));
}
app.setConfigurationType(RuntimeConfigurationType.DEPLOYMENT);
OMContextListener omcl = new OMContextListener();
omcl.contextInitialized(new ServletContextEvent(app.getServletContext()));
ThreadContext.setApplication(app);
app.initApplication();
}
return app;
}
Aggregations