lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: ResourceLoaderAware inform() before or after init()
Date Mon, 13 Aug 2012 18:53:24 GMT

: I am wondering what the expected initialization sequence of the analysis 
: factories are with respect to init() and ResourceLoaderAware.inform().  
: At least judging from some tests, it seems that inform() is called 
: afterwards.  I was expecting the other way around, so that init() can do 

The "inform" methods have always come after init(), largely tracing back 
to lifecycle problems of objects trying to use other objects that haven't 
been initialized yet.  (mainly because of SolrCoreAware but you can still 
run into the same thing with ResourceLoaderAware)

practically speaking: most classes parse their init params to get 
things like resouce names, then when inform(ResourceLoader) is called they 
use those names to get the resources from the loader.

This has been doc'ed on the wiki for a long time, not sure why it never 
made it into hte javadocs...


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message