We really should make this configurable. What's the best way?
IMHO the best way to make components like XIndice configurable is to use the Avalon Configuration mechanism. This holds true also for logging.
Many Apache projects are moving to Avalon, like Turbine and FOP. In the case of Turbine, they will base it on Avalon. In the case of FOP, as it could be here, it's just about the "external view" of the system, not the internals. So they use Logging now, and soon Configuration and proper feature pluggability.
While I think of myself as an Avalon guy, trying to put Avalon wherever I can, I think that here we have a quite different issue. We are talking about a client driver that is only given a URL to configure itself, and this can't change easily: it's like JDBC, you just can't really "configure" it (this would also break somehow the XML:DB API, where you are supposed to pass only the URL to the DatabaseManager).
Besides, the only thing we have to configure here is the servlet endpoint: you can already specify a different host and port in the URL, the only thing left is that "/Xindice/" part.
I think that basically there are only to ways to make it configurable:
1. Have a default and a way to override it via a system property;
2. Insert that information into the URL.
Both, however, look really ugly, so if someone has a better idea, I'm all ears.
Ciao,
-- Gianugo
