felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FELIX-2698) File Install Circular Configuration Update Loop
Date Tue, 17 Mar 2015 07:02:39 GMT

     [ https://issues.apache.org/jira/browse/FELIX-2698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Carsten Ziegeler closed FELIX-2698.

> File Install Circular Configuration Update Loop
> -----------------------------------------------
>                 Key: FELIX-2698
>                 URL: https://issues.apache.org/jira/browse/FELIX-2698
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-3.1.0
>            Reporter: David Hay
>            Assignee: Guillaume Nodet
>             Fix For: fileinstall-3.1.2
> Using FileInstall 3.1.0, when I update a .cfg file, the system is sent into an infinite
loop of updating the Configuration Admin Service and rewriting the cfg file.  The cycle goes
something like this:
> 1. Updated .cfg file is noticed by File Install DirectoryWatcher
> 2. The Configuration object is obtained and updated (in ConfigInstaller.setConfig(File))
> 3. The Configuration Admin Service fires a ConfigurationEvent
> 4. ConfigInstaller receives the ConfigurationEvent and writes out the new properties
to the .cfg
> 5. Go to step 1
> It seems like the ConfigInstaller object should figure out if the ConfigurationEvent
is in response to an update to the .cfg file it just loaded.  
> One way to do this might be to put a "special" value in the Configuration that the ConfigurationListener
method could look for.  
> Another way would be to compare the configuration in the .cfg file to the properties
that would normally be written.  If they're the same, don't write the file.

This message was sent by Atlassian JIRA

View raw message