Github user geomacy commented on the pull request:
https://github.com/apache/brooklyn-server/pull/65#issuecomment-197374653
My thought was that, while ServiceTracker in general may be preferred to
ServiceReference, it is actually not best suited in this use case, where in
fact I don't want to track the service (just as one wouldn't track the result
of a ServiceLoader.load()). If we were to use ServiceTracker then we would
have to take care of the open/close of the tracker, which would mean
maintaining that state, which would mean not using these static methods but
perhaps making the FrameworkLookup be a service in its own right, which would
have to be obtained from OSGI (and maybe tracked itself!). The client code in
this use case isn't expecting this sort of behaviour. What do you think?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---