Hi,
these are some good points. I plan some enhancements for
ConfigurationFactory and related classes and will take this into
account. Further comments below.
Borut Bolčina wrote:
Hi,
I've been using Commons Configuration successfully in several projects.
Besides XPath support I have 3 more feature wishes:
*[1] Getting Properties out of Configuration*
When using already written software components, some methods take
Properties as input parameter. If using CompositeConfiguration as a
central point for accesing properties, it would be desirable to get
Properties out of PropertiesConfiguration which is part of
CompositeConfiguration. Example of wanted functionality:
Configuration propertiesConfiguration = config.getConfiguration(2);
Properties properties = propertiesConfiguration.getProperties();
Asume 3rd entry in configuration.xml is <properties>.
This one has been answered by Jörg.
*[2] Inclusion of DatabaseConfiguration in configuration.xml*
It woould be nice to introduce something like <database> tag in
configuration.xml. The content of the tag would be connection string for
the database. Example:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<configuration>
<xml fileName="prop1.xml"/>
<xml fileName="prop2.xml"/>
<properties fileName="prop3.properties"/>
<database
connect="jdbc:mysql://delovc10.noviforum.si/feeds?user=foo&password=bar"/>
</configuration>
Of course, DatabaseConfiguration should be supported. In addition I
would like to have a mechanism for defining custom tags and including
user defined configuration classes.
*[3] Getting configurations out of configuration.xml could be done by
name and not by index.*
So, instead of
config.getConfiguration(2)
one could write
config.getConfiguration("entryThree");
A new attribute for each entry should be introduced, something like:
<configuration>
<xml id="entryOne" fileName="prop1.xml"/>
<xml id="entryTwo" fileName="prop2.xml"/>
<properties id="entryThree" fileName="prop3.properties"/>
<database id="entryFour"
connect="jdbc:mysql://delovc10.noviforum.si/feeds?user=foo&password=bar"/>
</configuration>
This is a feature I have missed myself. Using the subset() method you
can access specific sets of properties, but sometimes you really need
access to the Configuration object, e.g. for changing some settings. I
will implement this.
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]