[
https://issues.apache.org/jira/browse/FELIX-2698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933135#action_12933135
]
David Hay commented on FELIX-2698:
----------------------------------
If I have time to look at these issues, I will certainly provide patches.
> 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
>
> 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.