Jason van Zyl <[EMAIL PROTECTED]> writes:

> On Sat, 2002-03-23 at 14:18, John McNally wrote:
> > Something like the following:
>> 
>>         Configuration c =
>> configuration.subset("database").subset("adapter");
>>         Iterator i = c.getKeys();
>>         while (i.hasNext())
>>         {
>>             String key = (String)i.next();                
>>             String adapter = c.getString(key);
>>             DB db = DBFactory.create( adapter );
>>             // register the adapter for this name
>>             adapterMap.put(key, db);
>>         }
>> 
>> This code does not care, if the Configuration is reading a properties
>> file or an xml file.
>
> That may be true but, in the form of a properties you can't validate it,
> and making tools to help with configuration is a severe PITA. People can
> use them but I would strongly encourage the use of XML configuration
> files because errors can be spotted immediately and if people are making
> new configuration files then they can be assured they are being made
> correctly. We have partial config info in XML and in properties and I
> think we should settle on one format and I definitely don't think it
> should be properties files.

So we can encourage the XML interface, but I am also in favor of
allowing the classic properties file interface through the
Configuration interface.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to