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

Possible IllegalStateException for deleted Configuration from config admin

    XMLWordPrintableJSON

Details

    Description

      org.apache.felix.scr.impl.manager.RegionConfigurationSupport holds the support in SCR for dealing with configurations for components. This class does not handle the various methods on org.osgi.service.cm.Configuration that can throw an IllegalStateException if the configuration is deleted, for example:

      • org.osgi.service.cm.Configuration.getPid()
      • org.osgi.service.cm.Configuration.getProperties()
      • org.osgi.service.cm.Configuration.getProcessedProperties(ServiceReference<?>)
      • org.osgi.service.cm.Configuration.getFactoryPid()
      • org.osgi.service.cm.Configuration.getChangeCount()
      • org.osgi.service.cm.Configuration.getAttributes()

      This leaves SCR open to failing if the configuration has been deleted after SCR has gotten the configuration from ConfigurationAdmin but before SCR has been able to use the configuration to configure a component. Instead of having a catastrophic failure that bubbles the IllegalStateException up the stack, SCR should handle the exception and treat it as if the configuration was never found in the first place.

      Attachments

        Activity

          People

            tjwatson Tom Watson
            tjwatson Tom Watson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: