You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Roshan Paiva <Ro...@virtusa.com> on 2006/01/30 14:31:47 UTC

Changes to accommodate loading multiple property files

Hi All,

 

I understand that a PropertiesConfiguration object can only be
associated with a single file. Therefore, I have made some changes to
the classes to accommodate loading of multiple files. I would really
appreciate some feedback on the changes I have done as well as any areas
of improvement. Please find the classes changed attached.

 

What happens now is, 

- The PropertyConfiguration is initialized with a property file which
contains a list of properties it has to keep a track of. It will load
those properties within each of the property files and keep a track of
the files in a hashmap. (key: the property file, value: the last
accessed time)

- When getting a property it will check if the property file has been
modified,  if modified it will reload it and update the hashmap. 

 

Thanks and Regards

Roshan

 


Re: [configuration] Changes to accommodate loading multiple property files

Posted by Oliver Heger <ol...@t-online.de>.
(Please prefix the subjects of your postings with the name of the
affected component as I have done now.)

Roshan Paiva wrote:

> Hi All,
>
>  
>
> I understand that a PropertiesConfiguration object can only be
> associated with a single file. Therefore, I have made some changes to
> the classes to accommodate loading of multiple files. I would really
> appreciate some feedback on the changes I have done as well as any
> areas of improvement. Please find the classes changed attached.
>
Your attachment seems to be stripped off. It is probably better to open
a new bugzilla ticket and attach your changes there. See
http://jakarta.apache.org/commons/configuration/issue-tracking.html

>  
>
> What happens now is,
>
> - The PropertyConfiguration is initialized with a property file which
> contains a list of properties it has to keep a track of. It will load
> those properties within each of the property files and keep a track of
> the files in a hashmap. (key: the property file, value: the last
> accessed time)
>
> - When getting a property it will check if the property file has been
> modified,  if modified it will reload it and update the hashmap.
>
Because of the missing attachment I cannot really comment on your
changes. But based on your description it seems to me that you have
added quite a couple of new functionality to PropertiesConfiguration,
which is already provided by other classes like CompositeConfiguration
and ConfigurationFactory. Couldn't you just use these classes?

It is planed to enhance the XML description file used by
ConfigurationFactory to support the definition of reloading strategies
(among others) for the specified configurations. Would this solve your
problem?

>  
>
> Thanks and Regards
>
> Roshan
>
>  
>
Thanks
Oliver

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