You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Pierre De Rop (JIRA)" <ji...@apache.org> on 2012/05/28 00:59:22 UTC

[jira] [Created] (FELIX-3524) SCR configuration-pid from compendium 4.3

Pierre De Rop created FELIX-3524:
------------------------------------

             Summary: 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)
            Reporter: Pierre De Rop
            Priority: Minor


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

        

[jira] [Commented] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447013#comment-13447013 ] 

Pierre De Rop commented on FELIX-3524:
--------------------------------------

Just committed in revision 1380041 configuration-pid support in Scr shell "info" command.
The "scr info" command is now displaying the component's configuration-pid, as well as whether or not the configuration-pid has been declared in the descriptor.
 
                
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pierre De Rop resolved FELIX-3524.
----------------------------------

    Resolution: Fixed

the issue can now be resolved.
                
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated FELIX-3524:
-------------------------------------

    Fix Version/s:     (was: scr-1.8.0)
                   scr-1.6.2
    
> 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.6.2
>
>         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
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
     [ 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

attached the proposed patch
                
> 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)
>            Reporter: Pierre De Rop
>            Priority: Minor
>         Attachments: 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

        

[jira] [Commented] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13290072#comment-13290072 ] 

Pierre De Rop commented on FELIX-3524:
--------------------------------------

Hi Felix,

I have committed  a new method "test_get_configuration_pid_method" in the ComponentMetadataTest class.
This method checks the following:

1) ComponentMetadata.getConfigurationPid() returns the implementation class name if the component name is not specified
2) ComponentMetadata.getConfigurationPid() returns the component name if this one is specified in the component declaration



                
> 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

        

[jira] [Commented] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13290074#comment-13290074 ] 

Felix Meschberger commented on FELIX-3524:
------------------------------------------

Excellent. Thanks.
                
> 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

        

[jira] [Closed] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed FELIX-3524.
------------------------------------


Close after release
                
> 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.6.2
>
>         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
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287440#comment-13287440 ] 

Pierre De Rop commented on FELIX-3524:
--------------------------------------

ok, I just committed the patch, and updated the changelog.

now I'm starting to look at the corresponding tests ...

                
> 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

        

[jira] [Commented] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286468#comment-13286468 ] 

Felix Meschberger commented on FELIX-3524:
------------------------------------------

Thanks for providing the patch. I generally like it.

Some comments, though:
  * m_componetHoldersByPid holds a Set<ComponentHolder>. We should implement ComponentHolder.equals and .hashCode to make sure we properly support holding ComponentHolder in sets.
  * ComponentRegistry.registerComponentHolder does checks getConfigurationPid for null. This is probably not required because this is either the configured value or the component name (which in turn is either configured value or the implementation class name) and thus never null.
  * ComponentRegistry.unregisterComponentHolder could just use Set.remove(ComponentHolder) to remove the ComponentHolder from the set (see my first point on equals and hashCode)

WDYT ?

Other than that, I think this patch is definitely worth it. Would you be able to come up with tests ?

Thanks again.
                
> 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)
>            Reporter: Pierre De Rop
>            Assignee: Felix Meschberger
>            Priority: Minor
>         Attachments: 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

        

[jira] [Updated] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated FELIX-3524:
-------------------------------------

          Component/s: Specification compliance
    Affects Version/s:  scr-1.6.0
        Fix Version/s: scr-1.8.0
    
> 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
>
>
> 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

        

[jira] [Updated] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] [Commented] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288434#comment-13288434 ] 

Felix Meschberger commented on FELIX-3524:
------------------------------------------

> Let me know if you think more tests have to be done. 

Thanks. 

Maybe a few tests to prove ComponentMetadata.getConfigurationPid() never returns null and always returns the expected value (also in pre-SCR-1.2 scenarios) would be helpful. It think these could be done a simple JUnit tests.

> by the way, when do you plan to cut a DS release ? 

Real soon ...

I am a bit blocked by the large concurrency issues thread started by David Jencks. I would like to finish that before cutting a release.
                
> 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

        

[jira] [Assigned] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger reassigned FELIX-3524:
----------------------------------------

    Assignee: Felix Meschberger
    
> 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)
>            Reporter: Pierre De Rop
>            Assignee: Felix Meschberger
>            Priority: Minor
>         Attachments: 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

        

[jira] [Commented] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287407#comment-13287407 ] 

Felix Meschberger commented on FELIX-3524:
------------------------------------------

Excellent. Thanks.

You might want to go ahead and just commit your patch.
                
> 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

        

[jira] [Commented] (FELIX-3524) SCR configuration-pid from compendium 4.3

Posted by "Pierre De Rop (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288194#comment-13288194 ] 

Pierre De Rop commented on FELIX-3524:
--------------------------------------

Hi Felix,

I have committed an integration test (org.apache.felix.scr.integration.ComponentConfigurationPidTest.java, and resources/integration_test_simple_components_configuration_pid.xml), as well as a regular unit test (org.apache.felix.scr.impl.metadata.ComponentMetadataTest.test_configuration_pid_use_ds12()).

Let me know if you think more tests have to be done.

(Should I close this issue ? or do you prefer to do it just before the release ?)

by the way, when do you plan to cut a DS release ?
thanks.


 

                
> 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