felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ward <tim.w...@paremus.com>
Subject Re: @Reference multi binding & dynamics
Date Wed, 07 Oct 2015 13:19:06 GMT
I am relatively certain that this is the specified behaviour, and that it is consistent with
the bnd annotation properties that it replaces

Specifying AT_LEAST_ONE is the same as saying multiple=true, optional=false on the bnd annotation,
not using bnd's '+' shortcut.

The standard annotations map one annotation property to one XML attribute, which bnd did not
(optional and multiple both being cardinality restrictions). Bnd later added shortcuts for
some common DS cases, which is the source of the behaviour difference.

I hope this helps,


Sent from my iPhone

> On 7 Oct 2015, at 14:56, Ferry Huberts <mailings@hupie.com> wrote:
> Hi,
> Cross-posting because I don't know if the situation/problem below is by design, a bug
in bnd, or a bug in SCR
> I have a R6 component that does
>  @Reference(cardinality = ReferenceCardinality.AT_LEAST_ONE)
> This appears to not bind new matching services, because the policy appears to be STATIC
by default.
> I did expect the ReferenceCardinality.AT_LEAST_ONE to imply ReferencePolicy.DYNAMIC,
just like the bnd annotations did.
> Changing it to
>  @Reference(policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.AT_LEAST_ONE)
> appears to make it work like I expected.
> Is this by design?
> Coming from bnd annotations this - to me - seems like another (breaking) subtlety.
> -- 
> Ferry Huberts
> -- 
> You received this message because you are subscribed to the Google Groups "bndtools-users"
> To unsubscribe from this group and stop receiving emails from it, send an email to bndtools-users+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org

View raw message