You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Hongxin Liang <hx...@gmail.com> on 2013/05/31 13:59:41 UTC

Hook for destructing a plugin

Hi, 

I tried to develop a Solr plugin, more specifically a request handler. There is an "init" method that I can hook in my initialization logic, but I couldn't manage to find the corresponding "destroy" method in which I can tear down something. Also I tried to find some kind of event I can listen to, but unfortunately without any result.

So my question is how I can do such a thing.

Thank you very much. 

Best regards,
Hongxin Liang


Re: Hook for destructing a plugin

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
You can use SolrCore.addCloseHook method to release your plugin's resources.


On Fri, May 31, 2013 at 5:29 PM, Hongxin Liang <hx...@gmail.com>wrote:

> Hi,
>
> I tried to develop a Solr plugin, more specifically a request handler.
> There is an "init" method that I can hook in my initialization logic, but I
> couldn't manage to find the corresponding "destroy" method in which I can
> tear down something. Also I tried to find some kind of event I can listen
> to, but unfortunately without any result.
>
> So my question is how I can do such a thing.
>
> Thank you very much.
>
> Best regards,
> Hongxin Liang
>
>


-- 
Regards,
Shalin Shekhar Mangar.