commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <oliver.he...@oliver-heger.de>
Subject Re: [Configuration] DBConfiguration consumes my scarce resources
Date Wed, 14 Mar 2007 20:40:52 GMT
elcin haktanir wrote:
> 
> Why doesn't
> 
> **org.apache.commons.configuration.DatabaseConfiguration
> 
> always accesses to DB whenever i access for a value?
> 
> I very much like to have a cachable DBConfiguration and also a 
> DBReloading strategy can be attached to it..
> 
> I didn't like commons-configuration for this non-cachable reason..
> 
> It is ok for PropertiesConfiguration.
> 
> ******PropertiesConfiguration****
> **propertyConfiguration = new PropertiesConfiguration(PROPERTY_FILE);
> **FileChangedReloadingStrategy fileStrategy = new 
> FileChangedReloadingStrategy();
> fileStrategy.setRefreshDelay(60000);
> propertyConfiguration.setReloadingStrategy(fileStrategy);
> 
> but it will be much more beatufil if i can set a reoladingStrategy for 
> DbConfiguration either..
> 

You are right, the way DatabaseConfiguration is implemented ATM probably 
does not allow it to be used in a production environment. Caching 
features have not yet been implemented. There is a patch available at 
[1], which I probably will inspect for the 1.5 release.

Unfortunately the original author of DatabaseConfiguration is no more 
active on this list, which makes dealing with this class harder.

Oliver

[1] http://issues.apache.org/jira/browse/CONFIGURATION-180

---------------------------------------------------------------------
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