Github user geomacy commented on the pull request:
https://github.com/apache/brooklyn-server/pull/65#issuecomment-197362908
Thanks for this good point @CMoH. I think in this case, where we are using
the`getService` as an alternative to the ServiceLoader.load(), that the fact
that the reference count will only increase is not likely to cause a problem,
i.e. given how we are using it. It would certainly mean that the
FrameworkLookup class wouldn't be suitable for use in a situation where you
want to take account of services coming and going, and explicitly avoid using
the service when its reference count has gone to zero. I think this is worth
adding as a note in the Javadoc for this class, which I will do right now.
---
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.
---