public class ContextCleanupListener
extends java.lang.Object
DisposableBean
and haven't been removed before. This is typically used for destroying objects
in "application" scope, for which the lifecycle implies destruction at the
very end of the web application's shutdown phase.ServletContextScope
,
ContextLoaderListener
Constructor and Description |
---|
ContextCleanupListener() |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
cleanupAttributes(ServletContext servletContext)
Find all Spring-internal ServletContext attributes which implement
DisposableBean and invoke the destroy method on them. |
void |
contextDestroyed(ServletContextEvent event) |
void |
contextInitialized(ServletContextEvent event) |
private static final Log logger
public void contextInitialized(ServletContextEvent event)
public void contextDestroyed(ServletContextEvent event)
static void cleanupAttributes(ServletContext servletContext)
DisposableBean
and invoke the destroy method on them.servletContext
- the ServletContext to checkDisposableBean.destroy()