felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (FELIX-2275) Component descriptor reference elements are not ordered
Date Tue, 13 Apr 2010 11:54:50 GMT

     [ 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


View raw message