|
From: Leif M. <le...@ta...> - 2003-02-08 16:00:19
|
Christian,
I changed my mind a little bit about how to implement the cascading
configuration files.
It is all implemented and in CVS, so this will be in the next release.
Rather than using property names for include files, I decided to do
it on a lower level.
The property code now has the ability to recognize "#include <file>"
lines in the config
file. These include files will be processed at the point they are
included in the file so
their contents will override values set earlier and be overridden by
values set later.
By doing it this way, it is possible to nest include files as well. The
nesting level is limited
to 10 deep as an easy way to avoid include loops. If anyone thinks they
need more
than 10 levels, they should probably be taken out back and shot for
their own good.
The files specified are optional, so there will be no errors thrown
if an include file can
not be found or accessed.
Here is an example:
wrapper.conf:
---
#include ../conf/inc1.conf
wrapper.java.command=java
wrapper.java.initmemory=16
wrapper.java.maxmemory=64
#include ../conf/inc2.conf
---
inc1.conf
---
wrapper.java.initmemory=32
---
inc2.conf
---
wrapper.java.maxmemory=128
---
This will result in the following values being used by the wrapper.
---
wrapper.java.command=java
wrapper.java.initmemory=16
wrapper.java.maxmemory=128
---
Let me know how this will work for you or if you have any questions.
Cheers,
Leif
> Christian Beedgen wrote:
>
>> here is how this works in my implementation:
>>
>> ./wrapper ../conf/wrapper.conf include.1=../user.conf.1
>> include.2=../user.conf.2
>> and so on. the order that additional configuration properties are
>> applied is (of course) include.1, include.2, ...
>
|