: What is the best thing in Solr to hook into that would allow me to : start (and keep running) a custom piece of code when Solr starts? Say : I want to have something that pulls data from an external queue from : within Solr and indexes it into Solr and I want it start and stop : together with the Solr process. Is there any place in Solr where one : could do that?
My advice for this has always been a SolrCoreAware RequestHandler which spun up whatever threads it needs in it's init method and uses it's handleRequest method to return status information or recieve commands about pausing. This approach has worked very well for me in the past, oging as far back as Solr 1.0 -- which was before we even had the SolrCoreAware interface, i used a newSearcher listener back then to fire a "start" command to my custom RequestHandler. -Hoss