[
https://issues.apache.org/jira/browse/FELIX-6044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16761007#comment-16761007
]
ASF GitHub Bot commented on FELIX-6044:
---------------------------------------
Github user tjwatson closed the pull request at:
https://github.com/apache/felix/pull/180
> Component deactivation does not cause reference services to be ungotten
> -----------------------------------------------------------------------
>
> Key: FELIX-6044
> URL: https://issues.apache.org/jira/browse/FELIX-6044
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-2.1.14
> Reporter: Thomas Watson
> Priority: Major
>
> The fix to FELIX-5974 has caused an issue for the default reference scope of
> bundle. When a component has a simple @Reference and that component is
> deactivated the services that it references will not be ungotten by SCR.
> This causes all kinds of issues for use counting of the consumed service.
> The issue is that
> org.apache.felix.scr.impl.manager.DependencyManager.close(ComponentContextImpl<S>,
> EdgeInfo) is calling RefPair.unsetServiceObject now for all RefPair types.
> The RefPair types MultiplePrototypeRefPair and SinglePrototypeRefPair were
> updated to have unsetServiceObject to also have that service be ungotten.
> But the default SingleRefPair type was not. This causes issues when
> ultimately the DependencyManagers are deactivated later which then closes the
> customizer for the dependency and
> org.apache.felix.scr.impl.manager.DependencyManager.AbstractCustomizer.ungetService(RefPair<S,
> T>) is called. By this time there will now be a null service and it will
> not be ungotten.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)