felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-2698) File Install Circular Configuration Update Loop
Date Wed, 17 Nov 2010 20:12:13 GMT

    [ https://issues.apache.org/jira/browse/FELIX-2698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933124#action_12933124

Guillaume Nodet commented on FELIX-2698:

Do you plan to provide some patches for the 3 issues you raised ? That would be more than
welcome !

> 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.

View raw message