You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Stephen Flynn <st...@jftechnology.com> on 2010/04/12 14:27:09 UTC
Maven SCR Plugin, SCR Annotations and DS reference bind order.
Apologies if this is posted in the wrong place or this issue has already been
raised and I have missed it.
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.
As I understand it 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.
Do we understand *112.5.7* correctly ? If so have we missed the way to control
reference ordering with the SCR Maven Plugin ? I can write this up in more
detail and provide a simple example if required.
rgds,
Steve F.
--
===================================================
Stephen Flynn
Director, JF Technology (UK) Ltd
Cell(UK): +44 7768 003 882
Phone: +44 20 7253 8944
http://www.jftechnology.com
===================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Maven SCR Plugin, SCR Annotations and DS reference bind order.
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Stephen,
I think you understand 112.5.7 correctly and looking at the SCR Maven
Plugin implementation, we use a map to store the references before they
are written out - so we definitly loose the order; which is bad.
Therefore I think you found a bug; can you open a Jira issue (against
the Maven SCR Plugin) please and maybe attach a simple example?
Regards
Carsten
Stephen Flynn wrote
>
> Apologies if this is posted in the wrong place or this issue has already
> been raised and I have missed it.
>
> 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.
>
> As I understand it 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.
>
> Do we understand *112.5.7* correctly ? If so have we missed the way to
> control reference ordering with the SCR Maven Plugin ? I can write this
> up in more detail and provide a simple example if required.
>
> rgds,
>
> Steve F.
>
>
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org