: 2) Use the usual Solr servlet apparatus, but defer its startup until : other code in the webapp makes up its mind about configuration and : calls System.setProperty to locate the solr home and data directories.
I would suggest that route ... basically just create your own war, and subclass SolrDispatchFilter, do whatever configuration processing you want in your init(FilterConfig) method before delegating to super.init(...) -Hoss