Spring Framework

org.springframework.web.context
Class ContextCleanupListener

java.lang.Object
  extended by org.springframework.web.context.ContextCleanupListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class ContextCleanupListener
extends java.lang.Object
implements javax.servlet.ServletContextListener

Web application listener that cleans up remaining disposable attributes in the ServletContext, i.e. attributes which implement 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.

Since:
3.0
Author:
Juergen Hoeller
See Also:
ServletContextScope, ContextLoaderListener

Constructor Summary
ContextCleanupListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
           
 void contextInitialized(javax.servlet.ServletContextEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextCleanupListener

public ContextCleanupListener()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)
Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent event)
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener

Spring Framework