felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karel Haeck (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5572) Reference target filter fails when using field strategy for multiple cardinality reference with multiple component instances
Date Thu, 02 Mar 2017 15:36:45 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892432#comment-15892432
] 

Karel Haeck commented on FELIX-5572:
------------------------------------

Traced this down to method getReplaceCollection() in class org.apache.felix.scr.impl.inject.FieldHandler.

Fixing this will probably require some refactoring as the FieldHandler instance is  per component,
while its boundValues TreeMap shoud be distinct for each component instance.

> Reference target filter fails when using field strategy for multiple cardinality reference
with multiple component instances
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-5572
>                 URL: https://issues.apache.org/jira/browse/FELIX-5572
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-2.0.8
>            Reporter: Karel Haeck
>
> In this case the injected list seems additive, that is it contains all the references
matched for previous component instances,
> as well as the one matched by the current component. As such the list contains references
that do not match the target filter.
> A typical example is a Route component referencing Destinations (where Route and Destination
are both DS components).
> Using configuration admin each instance of the route has its own destinations.target
filter, but the injected list does not match the filter.
> When using method strategy, the target filter works as expected. Note also that the DS
introspection API reports the correct
> references, but the actual injected list does not match the introspection API.
> See https://github.com/Amplifino/snippets for a bndtools workspace example. ( branch
workaround contains the method strategy workaround).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message