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.

You're right. But why do we have this "totally dumb thing" (sic)
implemented *as a standard*? We provide out-of-the-box a "totally dumb thing" like:


in the configuration file:

    <root-collection dbroot="./db/" name="db">

and even in your code:

    String dbRoot = conf.getAttribute(Database.DBROOT, "./db/");

since users (including myself) were totally helpless in finding the path to their data.

Right once again.

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

this is for me the right solution. And you can have a running system by (1/2) unpacking the release, (3) modify the system.xml file, (4) modify the server.xml file. What I proposed in my previous mail.


Not true. The database will happily live under WEB-INF/db

My question: how does the user know that the db is under WEB-INF/db ? Your solution is to write a warn message into the log file.

     log.warn("The database root directory has been set to "
             + realPath + System.getProperty("file.separator") + dbRoot
             + ". Keep in mind that if a war upgrade will take place the 
database"
             + " will be lost.");

but:
- noone (at least I don't) reads the log file if everything works fine
- log files are deleted constantly

In the end, the user is very likely to *not know* where the db is. Which -as you rightly pointed out- is "not a pleasant user experience".

The risk that someone deletes the database (by reinstalling/upgrading
Xindice) is not 0.  And the user's data are way more important than a
few steps to follow.

-Vladimir

--
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice





Reply via email to