[
https://issues.apache.org/jira/browse/FELIX-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet updated FELIX-5576:
-----------------------------------
Affects Version/s: (was: scr generator 1.8.2)
scr-1.8.2
> 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-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)