You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Paolo Antinori (JIRA)" <ji...@apache.org> on 2017/03/02 08:39:45 UTC
[jira] [Commented] (FELIX-5576) SCR components and factoryPids
random issues
[ https://issues.apache.org/jira/browse/FELIX-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15891809#comment-15891809 ]
Paolo Antinori commented on FELIX-5576:
---------------------------------------
I'd like to open a PR but I'm not sure if there is a 1.x branch still maintained.
> SCR components and factoryPids random issues
> --------------------------------------------
>
> Key: FELIX-5576
> URL: https://issues.apache.org/jira/browse/FELIX-5576
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr generator 1.8.2
> Reporter: Paolo Antinori
>
> This affects {{mvn:org.apache.felix/org.apache.felix.scr/1.8.2}}.
> There is an issue with SCR, {{ConfigAdmin}} and {{factoryPids}} that leads to possible situation when {{ConfigAdmin}} update events are discarded.
> The issue is present in case of an interweaving of {{CM_LOCATION_CHANGED}} event.
> If that event is processed, it changes updates the reference of {{TargetPID}} with the wrong one (uses {{instance}} one instead than a {{service}} one) basically turning the stored reference unreachable, thus discarding subsequent update requests.
> The following code fixes the issue.
> {code}
> ✔ /data/repositories/work/felix [org.apache.felix.scr-1.8.2|●1✚ 1…288]
> 09:30 $ git diff --cached
> diff --git a/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java b/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
> index e2f63e9..3a15073 100644
> --- a/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
> +++ b/src/main/java/org/apache/felix/scr/impl/config/ConfigurationSupport.java
> @@ -357,8 +357,8 @@ public class ConfigurationSupport implements ConfigurationListener
> //this is a better match, delete old before setting new
> componentHolder.configurationDeleted( pid.getServicePid() );
> }
> - componentHolder.configurationUpdated( pid.getServicePid(), configInfo.getProps(),
> - configInfo.getChangeCount(), pid );
> + componentHolder.configurationUpdated( targetedPid.getServicePid(), configInfo.getProps(),
> + configInfo.getChangeCount(), targetedPid );
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)