1 5 package com.opensymphony.oscache.web; 6 7 import javax.servlet.ServletContext ; 8 import javax.servlet.ServletContextEvent ; 9 import javax.servlet.ServletContextListener ; 10 11 15 public class CacheContextListener implements ServletContextListener { 16 17 26 public void contextInitialized(ServletContextEvent servletContextEvent) { 27 ServletContext context = servletContextEvent.getServletContext(); 28 ServletCacheAdministrator.getInstance(context); 29 } 30 31 35 public void contextDestroyed(ServletContextEvent servletContextEvent) { 36 ServletContext context = servletContextEvent.getServletContext(); 37 ServletCacheAdministrator.destroyInstance(context); 38 } 39 40 } | Popular Tags |