Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1841

Cleanup on cm-properties

    XMLWordPrintableJSON

Details

    Description

      If a blueprint bundle use CM like:

      <cm-properties persistent-id="persistentId" id="my.config" xmlns="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0"/>
      

      if the configuration is created by another bundle (directly using ConfigurationAdmin) like:

              Configuration configuration = configurationAdmin.getConfiguration(CONFIG_PID, null);
              Dictionary<String, Object> dictionary = Optional.ofNullable(configuration.getProperties()).orElse(new Hashtable());
              for (Map.Entry entry : properties.entrySet()) {
                  dictionary.put(entry.getKey().toString(), entry.getValue());
              }
             configuration.update(dictionary);
      

      then, it's possible to have a race condition where the blueprint container thread starts whereas the config update is not complete (two different threads).

      Blueprint CM should have an option to wait an updated config. For instance, it could check _felix_.cm.newConfiguration property.

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            jbonofre Jean-Baptiste Onofré
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: