[configuration] Reloading also for included files?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[configuration] Reloading also for included files?

Wolf, Mirko (Extern)
Hi there,
first of all a happy new year and best wishes to all.

I use the configuration together with properties files. For a better
readability we split the configuration into separate files. Theses files are
included into the main-properties File.

The inclusion is done by:
 include=sample.properties
  ...

On the main-properties File there is a listener watching for modifications
and propagate them to the application.
This works fine.

But when the included-files are modified nothing happens, the listner didn't
recognize the modification.

Which is the way to observe the included files in the same manner like the
main-File?

Best regards

Mirko

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [configuration] Reloading also for included files?

David J. M. Karlsen
Wolf, Mirko (Extern) wrote:

> Hi there,
> first of all a happy new year and best wishes to all.
>
> I use the configuration together with properties files. For a better
> readability we split the configuration into separate files. Theses files are
> included into the main-properties File.
>
> The inclusion is done by:
>  include=sample.properties
>   ...
>
> On the main-properties File there is a listener watching for modifications
> and propagate them to the application.
> This works fine.
>
> But when the included-files are modified nothing happens, the listner didn't
> recognize the modification.
>
> Which is the way to observe the included files in the same manner like the
> main-File?

Sounds like a good idea - please file a jira issue for this, follow the
links at:
http://jakarta.apache.org/commons/configuration/issue-tracking.html



--
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [configuration] Reloading also for included files?

Oliver Heger-3
In reply to this post by Wolf, Mirko (Extern)
Wolf, Mirko (Extern) wrote:

> Hi there,
> first of all a happy new year and best wishes to all.
>
> I use the configuration together with properties files. For a better
> readability we split the configuration into separate files. Theses files are
> included into the main-properties File.
>
> The inclusion is done by:
>  include=sample.properties
>   ...
>
> On the main-properties File there is a listener watching for modifications
> and propagate them to the application.
> This works fine.
>
> But when the included-files are modified nothing happens, the listner didn't
> recognize the modification.
>
> Which is the way to observe the included files in the same manner like the
> main-File?
>
> Best regards
>
> Mirko
>
Would it be an option for you to use DefaultConfigurationBuilder for
collecting your properties files? You would create a XML configuration
definition file defining all the configuration sources (i.e. properties
files) to be included. Each source can be associated with a reloading
strategy. There is a larger section in the user guide covering this
class and how it can be used.

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]