commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
Subject RE: [Configuration] Issue with subset and substitution
Date Tue, 30 Mar 2004 07:08:18 GMT
Oliver Heger wrote on Tuesday, March 30, 2004 8:31 AM:

> The problem HierarchicalConfiguration and related stuff had with
> SubsetConfiguration has to do with code in the
> ConfigurationXMLDocument
> class that tries to determine a correct ConfigurationXMLReader
> implementation for a passed in Configuration object. This
> code tests if
> the Configuration object is instance of HierarchicalConfiguration and
> this test breaks if a SubsetConfiguration is passed.

Yes, but this is really ugly. The code relies heavily on internals and if you apply a delegator
(like it is done with Subset) it breaks immediately.

> I originally had suggested to add a getXMLReader() method to the
> Configuration interface. This would solve out problem now
> (ConfigurationXMLDocument could simply call this method and
> work on the
> returned reader). The reason why we decided against this was
> to keep the
>   interface simple and not add methods for a probably rarely
> used feature.

IMHO a hierarchical configuration should be directly covered by the standard Configuration
interface. Look e.g. at JNDI configuration. This should implement a hierarchical config also,
because it *is* a tree.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message