commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: [configuration] Getting Properties from the Configuration
Date Tue, 23 Aug 2005 18:03:00 GMT
Josef Holy <josef.holy@gmail.com> writes:

>Is there any way how to get the java.util.Properties instance from the
>Configuration? There are methods in the AbstractConfiguration class -
>subset(prefix) and getProperties(key), but none of them fits my need.

http://jakarta.apache.org/commons/configuration/apidocs_1.0/org/apache/commons/configuration/ConfigurationConverter.html

Configuration log4Conf = conf.subset("log4j");
PropertiesConfiguration.configure(
            ConfigurationConverter.getProperties(log4Conf));

BTDT, works fine. ;-)

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

		      4 - 8 - 15 - 16 - 23 - 42

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message