use of com.gitblit.manager.IManager in project gitblit by gitblit.
the class GitblitContext method destroyContext.
/**
* Gitblit is being shutdown either because the servlet container is
* shutting down or because the servlet container is re-deploying Gitblit.
*/
protected void destroyContext(ServletContext context) {
logger.info("Gitblit context destroyed by servlet container.");
IPluginManager pluginManager = getManager(IPluginManager.class);
if (pluginManager != null) {
for (LifeCycleListener listener : pluginManager.getExtensions(LifeCycleListener.class)) {
try {
listener.onShutdown();
} catch (Throwable t) {
logger.error(null, t);
}
}
}
for (IManager manager : managers) {
logger.debug("stopping {}", manager.getClass().getSimpleName());
manager.stop();
}
}
Aggregations