Class SolrShutdownService

java.lang.Object
fr.paris.lutece.plugins.search.solr.service.SolrShutdownService
All Implemented Interfaces:
fr.paris.lutece.portal.service.init.ShutdownService, fr.paris.lutece.portal.service.util.LuteceService

public class SolrShutdownService extends Object implements fr.paris.lutece.portal.service.init.ShutdownService
Closes the Solr client when the web application is undeployed. SolrServerService holds an Http2SolrClient, which owns a Jetty HttpClient and its own thread pool. Those threads are not managed by the servlet container : if the client is never closed, they survive the undeployment and keep the stopped web application classloader alive, leaking it on every hot redeployment. Registered as a Spring bean so that ShutdownServiceManager picks it up through SpringContextService.getBeansOfType( ShutdownService.class ). The core runs it from AppInitListener.contextDestroyed, before the Spring context itself is closed.
  • Constructor Details

    • SolrShutdownService

      public SolrShutdownService()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface fr.paris.lutece.portal.service.util.LuteceService
    • process

      public void process()
      Specified by:
      process in interface fr.paris.lutece.portal.service.init.ShutdownService