You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2010/11/30 19:12:12 UTC

[jira] Resolved: (FELIX-2698) File Install Circular Configuration Update Loop

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

Guillaume Nodet resolved FELIX-2698.
------------------------------------

       Resolution: Fixed
    Fix Version/s: fileinstall-3.1.2
         Assignee: Guillaume Nodet

> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.