David Jencks created FELIX-5079:
-----------------------------------

             Summary: [DS] Not enough configuration listeners to deal with 
regions
                 Key: FELIX-5079
                 URL: https://issues.apache.org/jira/browse/FELIX-5079
             Project: Felix
          Issue Type: Bug
          Components: Declarative Services (SCR)
    Affects Versions: scr-2.0.2
            Reporter: David Jencks
            Assignee: David Jencks


We implemented the global extender flag that lets DS deal with components in 
all regions (or in more spec terms all bundles everywhere in the framework 
regardless of visibility to the DS bundle)  but there is only one 
ConfigurationListener registered with the DS bundle context.  Obviously if 
there are different CA's in different regions this won't work.

Another twist is that (apparently, according to Tom Watson) just because a 
bundle A can see a particular CA instance B does not mean that B can see a 
ConfigurationListener registered by A.

This might work:
1. When a bundle to be extended arrives, and it has configurable components in 
it, we register a ServiceTracker for config admin with that bundle.
2. When the service tracker detects a CA, we check that it is a CA compatible 
with the DS CA class, and whether we already know about it.
3. if it's our kind of CA and we don't know about it, then we register a 
ConfigurationListener with the CA's bundle.
4. When the last service tracker knowing about a particular CA indicates the CA 
is leaving we unregister the ConfigurationListener (or when the last bundle 
using that CA stops)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to