You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Konstantin Shaposhnikov <k8...@tut.by> on 2003/09/24 16:31:13 UTC

commons-configuration improvement

I've tried to create my own Configuration class which loads properties 
from database. Because I don't want to implement all methods from 
Configuration interface by myself I decide to extend my class from 
BaseConfiguration and found that it is not easy task.

All methods which retreive properties call private method 
resolveContainerStore, which directly access store Map in which 
BaseConfiguration store properties. So if I only want to change way how 
properties retreived from underlying data store I also need to override 
all getProperty methods (JNDIConfiguration implemented in this way).

There is easy solution for this problem. We can add new protected method 
in BaseConfiguration which provide way to retreive property values (and 
call it f.e. getPropertyDirect) and replace all occurrence of accesing 
store map with call to this method.

What do you think about it?

P.S. Sorry for my bad English.

Konstantin