On 6/20/06, Yoav Shapira <[EMAIL PROTECTED]> wrote:
- Relying on the current working directory (CWD) in any enterprise application is an evil on the same order as peppering your code with System.exit() calls. Let's not do it in Solr, it's a very slippery slope.
We already have alternate ways of specifying the solr home which contains the config... both through a system property, or through a jndi lookup. The problem has more to do with the included demo server... we don't know the absolute path of anything, and we don't want people to have to go and configure things just to start up a little demo.
(Note this isn't specifically anti-Jetty, just let's not do this in general, and you noted Jetty allows this while Tomcat does not).
Tomcat does allow it, it's just easier to make a mistake. The user could do "cd bin; ./startup.sh" instead of "./bin/startup.sh" and mess up the CWD. Tomcat also must make use of the CWD to set CATALINA_HOME if it's not set :-)
- You can change the logging.properties that Tomcat uses to your heart's content, including enabling only a console logger or whatever. It's pretty easy to do.
Actually, I just figured out that I could do bin/catalina.sh run, and you see the log messages in the current window, and you can exit with CRTL-C. So perhaps we could have our own start script that figured out the current solr home, sets it via JAVA_OPTS, and calls "bin/catalina.sh run" There should probably be comments in the start-script saying how that isn't the recommended approach for production. -Yonik