Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C6D4191C2 for ; Wed, 16 Mar 2016 14:48:55 +0000 (UTC) Received: (qmail 14037 invoked by uid 500); 16 Mar 2016 14:48:55 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 14003 invoked by uid 500); 16 Mar 2016 14:48:55 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 13992 invoked by uid 99); 16 Mar 2016 14:48:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Mar 2016 14:48:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F0275DFBD5; Wed, 16 Mar 2016 14:48:54 +0000 (UTC) From: geomacy To: dev@brooklyn.apache.org Reply-To: dev@brooklyn.apache.org References: In-Reply-To: Subject: [GitHub] brooklyn-server pull request: Service loader updates Content-Type: text/plain Message-Id: <20160316144854.F0275DFBD5@git1-us-west.apache.org> Date: Wed, 16 Mar 2016 14:48:54 +0000 (UTC) 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---