Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-6044

Component deactivation does not cause reference services to be ungotten

    XMLWordPrintableJSON

Details

    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.

      Attachments

        Issue Links

          Activity

            People

              tjwatson Tom Watson
              tjwatson Tom Watson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: