Vladimir R. Bossicard wrote:
+ // We need to ensure that the database points to a place where it makes
+ // sense. If the path in the system.xml file is an absolute path, then
+ // honor it. If it's not, we first check for the system property "xindice.db.home"
+ // and if the lookup is successful we use it as the database root parent. If
+ // the property is not set, we use /WEB-INF relative to the servlet context, unless
+ // the war has not been unpacked. In this case, we throw an exception and + // ask the user to specify the location of database root


Why does a relative path not make sense?

Because it's not deterministic. It's relative to the cwd where the JVM was started, which is IMHO a totally dumb thing. This had to change, since users (including myself) were totally helpless in finding the path to their data (which, in a DB, is not a pleasant user experience). I think there are only two ways to address this:


1. prepare a strategy which is, at least, clear and documented. This strategy of course can be changed (for one, it doesn't really make sense to use xindice.db.home when xindice.home would suffice), but at least it's a solution;

2. put a non-valid value in system.xml and forbid the database start if the user doesn't configure that file.

Layering out a database in random places is not a solution.

Since this is not an "out-of-the-box" solution anymore (the user will have to either specify the xindice.db.home variable or modify the system.xml file)

Not true. The database will happily live under WEB-INF/db, if the WAR was unpacked (which AFAIU is the vast majority of cases). And, for the record, I sure think that this *has* to be, as much as possibile, an "out-of-the-box" solution, so I'm more than willing to work in that direction.



why do we have to guess what the right thing is when it
would be so much easier to let the user provide it :

1) create the xindice directory under your webapp server "webapps" directory. For Tomcat:
[...]
5) start your webapp server

If the user has problem following these instructions, I think he has more important problems to solve.

I don't see why the user should have to do all this fuss when it's perfectly avoidable. Again, usability is a key issue,even in Open Source.


Ciao,

--
Gianugo Rabellino



Reply via email to