|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.constructs.web.ShutdownListener
public class ShutdownListener
A ServletContextListener that shutsdown CacheManager. Use this when you want to shutdown ehcache automatically when the web application is shutdown.
To receive notification events, this class must be configured in the deployment descriptor for the web application. To do so, add the following to web.xml in your web application:
<listener> <listener-class>net.sf.ehcache.constructs.web.ShutdownListener</listener-class> </listener>
Constructor Summary | |
---|---|
ShutdownListener()
|
Method Summary | |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
Notification that the servlet context is about to be shut down. |
void |
contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
Notification that the web application is ready to process requests. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShutdownListener()
Method Detail |
---|
public void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
contextInitialized
in interface javax.servlet.ServletContextListener
servletContextEvent
- public void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
Shuts down all cache managers known to CacheManager.ALL_CACHE_MANAGERS
contextDestroyed
in interface javax.servlet.ServletContextListener
servletContextEvent
-
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |