Interface UninitializingBean

All Known Implementing Classes:
AbstractServerLoadMonitor, AutoShutdownScheduledThreadPoolExecutor, DefaultScriptSessionManager, DefaultServerLoadMonitor, PollingServerLoadMonitor, SmallSiteServerLoadMonitor, SpringContainer, ThreadDroppingServerLoadMonitor

public interface UninitializingBean

Like InitializingBean except that this requests notification when things are shutting down.

Joe Walker [joe at getahead dot ltd dot uk]
See Also:

Method Summary
 void contextDestroyed()
          Called when a ServletContext is being destroyed.
 void servletDestroyed()
          Called when GenericServlet.destroy() is called.

Method Detail


void contextDestroyed()
Called when a ServletContext is being destroyed. DWR finds out about this destruction if (and only if) in web.xml there is a DwrListener registered. This happens before the GenericServlet.destroy() is called.

If DwrListener is not registered, this will not happen

This method should only be used when we need to take action to enable the servlet to stop cleanly. Typically this will be restricted to stopping reverse ajax threads.


void servletDestroyed()
Called when GenericServlet.destroy() is called. This event is the preferred time to close resources that don't require all connections to be closed. The servletDestroy method is far more likely to be called.

Copyright 2008