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

ASF GitHub Bot commented on FELIX-6044:
---------------------------------------

GitHub user tjwatson opened a pull request:

    https://github.com/apache/felix/pull/180

    FELIX-6044 - avoid calling ungetServiceObject too early for simple case of 
SingleRefPair

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tjwatson/felix FELIX-6044

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/felix/pull/180.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #180
    
----
commit bf7f727dc812458133e1f8814a9f4ae6b5df3988
Author: Tom Watson <tjwatson@...>
Date:   2019-02-01T17:28:38Z

    FELIX-6044 - avoid calling ungetServiceObject too early for simple case
    of SingleRefPair

----


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

Reply via email to