Product Documentation : Ehcache Operations Guide : Shutting Down Ehcache : ServletContextListener
ServletContextListener
Ehcache provides a ServletContextListener that shuts down the CacheManager. Use this to shut down Ehcache automatically, when the web application is shut down. 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>
Copyright © 2010-2015 Software AG, Darmstadt, Germany.

Product Logo |   Feedback