Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-2698

File Install Circular Configuration Update Loop

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: fileinstall-3.1.0
    • Fix Version/s: fileinstall-3.1.2
    • Component/s: File Install
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              gnodet Guillaume Nodet
              Reporter:
              dhay David Hay
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: