commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <>
Subject Re: [Configuration] How to get a list of the config files in configuration.xml
Date Fri, 16 Apr 2004 08:58:14 GMT
I think there is no easy way to get the list of files that have been 
loaded through the Configuration API.

It is possible to access the configuration objects that have been loaded 
from the <overload> section (through the CompositeConfiguration object 
returned by ConfigurationFactory). If you cast these to the correct 
types you may be able to query the file name. Configurations loaded from 
the <union> section are combined to a large configuration object and the 
information from which sources it has been constructed is lost.

In short, the Configuration API won't be a great help for you. So as a 
workaround it might make sense to use digester. It is planned to add 
reloading features to Configuration, so such hacks will hopefully become 
unnecessary in the future.


Michael MATTOX schrieb:

> I'm implementing an auto-refresh function for the Configuration.  To do this
> I need to get a list of the config files listed in configuration.xml.  I
> looked through the Javadocs and couldn't find a way to get the list.  Is it
> possible with the Configuration API?  If not, should I use the digester
> project to read in the list??
> Thanks,
> Michael Mattox
> --
> This E-mail is confidential.  It may also be legally privileged.  If you are
> not the addressee you may not copy, forward, disclose or use any part of it.
> If you have received this message in error, please delete it and all copies
> from your system and notify the sender immediately by return E-mail.
> Internet communications cannot be guaranteed to be timely, secure, error or
> virus-free.  The sender does not accept liability for any errors or omissions.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Dipl.-Inform. Oliver Heger
Zentrale Informationsverarbeitung (ZIV) / Bereich Anwenderverfahren
Klinikum der Philipps-Universit├Ąt Marburg
Bunsenstra├če 3,
D-35037 Marburg
Tel: +49 6421 28-66592

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

View raw message