You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Stephen Flynn (JIRA)" <ji...@apache.org> on 2010/04/12 17:42:41 UTC
[jira] Created: (FELIX-2275) Component descriptor reference
elements are not ordered
Component descriptor reference elements are not ordered
-------------------------------------------------------
Key: FELIX-2275
URL: https://issues.apache.org/jira/browse/FELIX-2275
Project: Felix
Issue Type: Bug
Components: Maven SCR Plugin
Affects Versions: maven-scr-plugin-1.4.2
Reporter: Stephen Flynn
We use SCR annotations (1.2.0) and the SCR Maven Plug-in (1.4.2) to generate DS 1.1 component descriptors. All works well except for one issue - we cannot find a way to control the order of <reference/> elements in the generated descriptor through the @Reference annotation. A cursory glance suggests that <reference/> elements generated by the plug-in are not ordered in any way.
The order of binding is significant. From the 4.2 Compendium spec....
*112.5.7 Binding Services*
"When binding services, the references are processed in the order in which
they are specified in the component description. That is, target services from
the first specified reference are bound before services from the next specified
reference."
We can work around this by manually creating descriptors but this is sub-optimal for obvious reasons.
This appears to be caused by capturing references in a HashMap in the class SCRDescriptorGenerator.java. Should probably be a LinkedHashMap instead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (FELIX-2275) Component descriptor reference
elements are not ordered
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler resolved FELIX-2275.
-------------------------------------
Fix Version/s: maven-scr-plugin-1.4.4
Resolution: Fixed
Thanks for your patch, Steven - I've applied it in revision 933567
> Component descriptor reference elements are not ordered
> -------------------------------------------------------
>
> Key: FELIX-2275
> URL: https://issues.apache.org/jira/browse/FELIX-2275
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.4.2
> Reporter: Stephen Flynn
> Assignee: Carsten Ziegeler
> Fix For: maven-scr-plugin-1.4.4
>
> Attachments: ExampleComponent.java, FELIX-2275.patch, serviceComponents.xml
>
>
> We use SCR annotations (1.2.0) and the SCR Maven Plug-in (1.4.2) to generate DS 1.1 component descriptors. All works well except for one issue - we cannot find a way to control the order of <reference/> elements in the generated descriptor through the @Reference annotation. A cursory glance suggests that <reference/> elements generated by the plug-in are not ordered in any way.
> The order of binding is significant. From the 4.2 Compendium spec....
> *112.5.7 Binding Services*
> "When binding services, the references are processed in the order in which
> they are specified in the component description. That is, target services from
> the first specified reference are bound before services from the next specified
> reference."
> We can work around this by manually creating descriptors but this is sub-optimal for obvious reasons.
> This appears to be caused by capturing references in a HashMap in the class SCRDescriptorGenerator.java. Should probably be a LinkedHashMap instead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (FELIX-2275) Component descriptor reference
elements are not ordered
Posted by "Stephen Flynn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Flynn updated FELIX-2275:
---------------------------------
Attachment: FELIX-2275.patch
Patch replacing reference HashMap with LinkedHashMap.
> Component descriptor reference elements are not ordered
> -------------------------------------------------------
>
> Key: FELIX-2275
> URL: https://issues.apache.org/jira/browse/FELIX-2275
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.4.2
> Reporter: Stephen Flynn
> Assignee: Carsten Ziegeler
> Attachments: ExampleComponent.java, FELIX-2275.patch, serviceComponents.xml
>
>
> We use SCR annotations (1.2.0) and the SCR Maven Plug-in (1.4.2) to generate DS 1.1 component descriptors. All works well except for one issue - we cannot find a way to control the order of <reference/> elements in the generated descriptor through the @Reference annotation. A cursory glance suggests that <reference/> elements generated by the plug-in are not ordered in any way.
> The order of binding is significant. From the 4.2 Compendium spec....
> *112.5.7 Binding Services*
> "When binding services, the references are processed in the order in which
> they are specified in the component description. That is, target services from
> the first specified reference are bound before services from the next specified
> reference."
> We can work around this by manually creating descriptors but this is sub-optimal for obvious reasons.
> This appears to be caused by capturing references in a HashMap in the class SCRDescriptorGenerator.java. Should probably be a LinkedHashMap instead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (FELIX-2275) Component descriptor reference
elements are not ordered
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler reassigned FELIX-2275:
---------------------------------------
Assignee: Carsten Ziegeler
> Component descriptor reference elements are not ordered
> -------------------------------------------------------
>
> Key: FELIX-2275
> URL: https://issues.apache.org/jira/browse/FELIX-2275
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.4.2
> Reporter: Stephen Flynn
> Assignee: Carsten Ziegeler
> Attachments: ExampleComponent.java, serviceComponents.xml
>
>
> We use SCR annotations (1.2.0) and the SCR Maven Plug-in (1.4.2) to generate DS 1.1 component descriptors. All works well except for one issue - we cannot find a way to control the order of <reference/> elements in the generated descriptor through the @Reference annotation. A cursory glance suggests that <reference/> elements generated by the plug-in are not ordered in any way.
> The order of binding is significant. From the 4.2 Compendium spec....
> *112.5.7 Binding Services*
> "When binding services, the references are processed in the order in which
> they are specified in the component description. That is, target services from
> the first specified reference are bound before services from the next specified
> reference."
> We can work around this by manually creating descriptors but this is sub-optimal for obvious reasons.
> This appears to be caused by capturing references in a HashMap in the class SCRDescriptorGenerator.java. Should probably be a LinkedHashMap instead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (FELIX-2275) Component descriptor reference elements
are not ordered
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler closed FELIX-2275.
-----------------------------------
> Component descriptor reference elements are not ordered
> -------------------------------------------------------
>
> Key: FELIX-2275
> URL: https://issues.apache.org/jira/browse/FELIX-2275
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.4.2
> Reporter: Stephen Flynn
> Assignee: Carsten Ziegeler
> Fix For: maven-scr-plugin-1.4.4
>
> Attachments: ExampleComponent.java, FELIX-2275.patch, serviceComponents.xml
>
>
> We use SCR annotations (1.2.0) and the SCR Maven Plug-in (1.4.2) to generate DS 1.1 component descriptors. All works well except for one issue - we cannot find a way to control the order of <reference/> elements in the generated descriptor through the @Reference annotation. A cursory glance suggests that <reference/> elements generated by the plug-in are not ordered in any way.
> The order of binding is significant. From the 4.2 Compendium spec....
> *112.5.7 Binding Services*
> "When binding services, the references are processed in the order in which
> they are specified in the component description. That is, target services from
> the first specified reference are bound before services from the next specified
> reference."
> We can work around this by manually creating descriptors but this is sub-optimal for obvious reasons.
> This appears to be caused by capturing references in a HashMap in the class SCRDescriptorGenerator.java. Should probably be a LinkedHashMap instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (FELIX-2275) Component descriptor reference
elements are not ordered
Posted by "Stephen Flynn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/FELIX-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Flynn updated FELIX-2275:
---------------------------------
Attachment: ExampleComponent.java
serviceComponents.xml
Example annotated component and its generated descriptor showing references in wrong order.
> Component descriptor reference elements are not ordered
> -------------------------------------------------------
>
> Key: FELIX-2275
> URL: https://issues.apache.org/jira/browse/FELIX-2275
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: maven-scr-plugin-1.4.2
> Reporter: Stephen Flynn
> Attachments: ExampleComponent.java, serviceComponents.xml
>
>
> We use SCR annotations (1.2.0) and the SCR Maven Plug-in (1.4.2) to generate DS 1.1 component descriptors. All works well except for one issue - we cannot find a way to control the order of <reference/> elements in the generated descriptor through the @Reference annotation. A cursory glance suggests that <reference/> elements generated by the plug-in are not ordered in any way.
> The order of binding is significant. From the 4.2 Compendium spec....
> *112.5.7 Binding Services*
> "When binding services, the references are processed in the order in which
> they are specified in the component description. That is, target services from
> the first specified reference are bound before services from the next specified
> reference."
> We can work around this by manually creating descriptors but this is sub-optimal for obvious reasons.
> This appears to be caused by capturing references in a HashMap in the class SCRDescriptorGenerator.java. Should probably be a LinkedHashMap instead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira