On Sep 12, 2010, at 2:40 PM, Ted Dunning wrote: > The reflection option sounds dangerous because it isn't clear that the > classes will be loaded yet which would mean that they wouldn't be seen.
Agreed. > > Option 2 is, as you say, relatively simple. I have this working and will post/commit a patch. > > On Sun, Sep 12, 2010 at 10:21 AM, Grant Ingersoll <[email protected]>wrote: > >> My first thought is to create a JOB jar that contains the properties, but >> the thought occurred to me that there might be a way to enhance the >> classpath. Other thoughts: >> 1. Instead of requiring driver.classes.props, we could just have an >> Interface that each of those drivers implements that reports it's short name >> and description and then we just need to do some reflection at startup to >> get all implementers of the interface. >> 2. We create a "default.driver.classes.props" that is actually packaged >> into the JOB jar. We first look for driver.classes.props then we look for >> default.driver.classes.props, then we throw an exception. >> >> I guess my preference is #2, since that is the least code, still allows the >> existing functionality to work and provides reasonable defaults w/o any >> setup. >> -------------------------- Grant Ingersoll http://lucenerevolution.org Apache Lucene/Solr Conference, Boston Oct 7-8
