You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Thomas Watson (JIRA)" <ji...@apache.org> on 2019/02/01 17:24:00 UTC

[jira] [Updated] (FELIX-6044) Component deactivation does not cause reference services to be ungotten

     [ https://issues.apache.org/jira/browse/FELIX-6044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Watson updated FELIX-6044:
---------------------------------
    Description: 
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.

  was:
The fix to FELIX-5276 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.


> 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)