[ 
https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre De Rop updated FELIX-3524:
---------------------------------

    Attachment: FELIX-3524.patch

Hi Felix,

Good to know you appreciate the patch;

Yes, I do agree with your suggestions, and applied them
(see patch attached to this post).

I also aligned the patch wit the recent modifications made during this week. 

So, I did the following:

- the ComponentFactoryImpl and ImmediateComponentHolder classes are now 
implementing equals/hashcode methods.
- the ComponentRegistry.registerComponentHolder does not check anymore 
getConfigurationPid for null.
- the ComponentRegistry.unregisterComponentHolder is now using Set.remove

Ok, so, I'm OK to continue with the tests, and will add some tests related to 
this new feature.

regards
/pierre
                
> SCR configuration-pid from compendium 4.3
> -----------------------------------------
>
>                 Key: FELIX-3524
>                 URL: https://issues.apache.org/jira/browse/FELIX-3524
>             Project: Felix
>          Issue Type: New Feature
>          Components: Declarative Services (SCR), Specification compliance
>    Affects Versions:  scr-1.6.0
>            Reporter: Pierre De Rop
>            Assignee: Felix Meschberger
>            Priority: Minor
>             Fix For: scr-1.8.0
>
>         Attachments: FELIX-3524.patch, FELIX-3524.patch
>
>
> This issue is about implementing the new "configuration-pid" component 
> attribute specified by the OSGi 4.3 compendium. So far, components were using 
> the component name in order to retrieve the component configuration from 
> config admin. But In the section 112.4.4,  a component can now define an 
> optional specific configuration-pid, in order to use a PID which is different 
> from the component name.
> I have attached to this issue a proposed candidate patch, if someone could 
> review it and hopefully commit it.
> I have not yet made a unit test, but if my propose patch seems reasonable and 
> is accepted, then I will try to learn to implement the corresponding test.
> Here is a brief description of the patch:
> - first the parser (XmlHandler/ComponentMetaData) has been modified in order 
> to parse the new configiration-pid attribute from the component element (the 
> parsing fails if the version is not greater or equals to DS 1.2).
> - next, in ComponentRegistry.java, we are now holding the mapping between 
> configuration pids and their respective components: a new method 
> getComponentHoldersByPid(String pid) method has been added, and returns the 
> iterator on the ComponentHolders which must be configured with the given pid. 
> Please see comments in patch.
> - in ConfigurationSupport.java:  when a configuration update is detected from 
> config admin, then the updated is notified to all components whose 
> configuration-pid are referencing the updated pid.
> thanks.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to