Changeset 415

Show
Ignore:
Timestamp:
11/09/08 11:29:14 (2 months ago)
Author:
arneke
Message:

#54 destroy() methods for RESTDispatcher and GeoWebCacheDispatcher?

Location:
trunk/geowebcache/src/main
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/geowebcache/src/main/java/org/geowebcache/GeoWebCacheDispatcher.java

    r377 r415  
    184184 
    185185    /** 
     186     * Destroy function, has to be referenced in bean declaration: 
     187     * <bean ... destroy="destroy">...</bean> 
     188     */ 
     189    public void destroy() { 
     190        log.info("GeoWebCacheDispatcher.destroy() was invoked, shutting down."); 
     191    } 
     192     
     193    /** 
    186194     * Essentially this slices away the prefix, leaving type and request 
    187195     *  
  • trunk/geowebcache/src/main/java/org/geowebcache/rest/RESTDispatcher.java

    r410 r415  
    107107 
    108108    /** 
     109     * Destroy function, has to be referenced in bean declaration: 
     110     * <bean ... destroy="destroy">...</bean> 
     111     */ 
     112    public void destroy() { 
     113        log.info("RESTDispatcher.destroy() was invoked, shutting down."); 
     114         
     115        // Shut down all the waiting and running tasks... brutally 
     116        tpe.shutdownNow(); 
     117    } 
     118     
     119    /** 
    109120     * Method is responsible for handling HTTP requests 
    110      *  
    111      *  
     121     *   
    112122     */ 
    113  
    114123    protected ModelAndView handleRequestInternal(HttpServletRequest request, 
    115124            HttpServletResponse response) { 
     
    125134        return null; 
    126135    } 
    127  
     136     
     137     
    128138    /** 
    129139     * Method instantiates the restlet router 
  • trunk/geowebcache/src/main/webapp/WEB-INF/geowebcache-servlet.xml

    r413 r415  
    4141   
    4242  <!-- controller for handling incoming requests made through the REST interface --> 
    43   <bean id="gwcRESTDispatcher" class="org.geowebcache.rest.RESTDispatcher"> 
     43  <bean id="gwcRESTDispatcher" class="org.geowebcache.rest.RESTDispatcher" destroy-method="destroy"> 
    4444    <constructor-arg type="org.geowebcache.layer.TileLayerDispatcher" ref="gwcTLDispatcher"/> 
    45         <constructor-arg type="org.geowebcache.util.XMLConfiguration" ref="gwcXmlConfig"/> 
     45    <constructor-arg type="org.geowebcache.util.XMLConfiguration" ref="gwcXmlConfig"/> 
    4646  </bean> 
    4747   
    4848  <!-- controller for handling all incoming requests --> 
    49   <bean id="geowebcacheDispatcher" class="org.geowebcache.GeoWebCacheDispatcher"> 
     49  <bean id="geowebcacheDispatcher" class="org.geowebcache.GeoWebCacheDispatcher" destroy-method="destroy"> 
    5050    <property name="tileLayerDispatcher" ref="gwcTLDispatcher"/> 
    5151    <!-- property name="servletPrefix" value=""/ -->