tjwatson commented on PR #334: URL: https://github.com/apache/felix-dev/pull/334#issuecomment-3005169140
> That ungets all known service objects that were obtained from the `ServiceObjects` from the framework. It then does the unget again for the actual reference from the `field` reference. But the real problem IMO is that it ungets all the known objects when the reference service is "unbound". What I think needs to happen here is that it should not call `componentContext.getComponentServiceObjectsHelper().closeServiceObjects(refPair.getRef());` until all references for that same `ServiceReference` have been completely unbound. But this still has weird corner cases if the `ComponentServiceObjects` was injected as a dynamic/optional reference and only that reference gets unbound (because of some target filter). It would seem like that situation should unget all the services obtained by that `ComponentServiceObjects`. But currently the implementation shared the same `ComponentServicesObject` instance for every reference in a component instance. All of this would have been so much more clear if each reference used a different `ComponentServicesObject` to manage their individual instance. But the spec took a different approach which makes this more confusing and hard to implement. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@felix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org