Return-Path: X-Original-To: apmail-felix-users-archive@minotaur.apache.org Delivered-To: apmail-felix-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 02D7710D2B for ; Wed, 19 Mar 2014 11:27:12 +0000 (UTC) Received: (qmail 9132 invoked by uid 500); 19 Mar 2014 11:27:10 -0000 Delivered-To: apmail-felix-users-archive@felix.apache.org Received: (qmail 8625 invoked by uid 500); 19 Mar 2014 11:27:09 -0000 Mailing-List: contact users-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@felix.apache.org Delivered-To: mailing list users@felix.apache.org Delivered-To: moderator for users@felix.apache.org Received: (qmail 6921 invoked by uid 99); 19 Mar 2014 11:25:48 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=DYCNJ/uHB6NblaZCxdi7RjwQ3fyTIRNWA8Ev857V+xA=; b=dEGCWvFdkcrwzGvLwkW69puxEughgI1i9kfLE1+5kdTi6wwscSenajiEk3tqmslTWy 2kmGfTSbi23BLolz7JZXagCfLDmWHjmqbEAmFL0n3leDlLTRUN96n9Ka8CW2zJeEMSR8 cCu9OJU28KsCIK259hd80ZqW2VgvielzSdg+oO5bfuo3qOHak/2KlziSNP1P4tu+1ElL hfSop8pJHQ1vyg/Gj/NTTB5KfTCs2sQY159MfuflYO27a3Q8Q8DUS9DMwe+5h8mtvl+d 7amY603bJGm5IZzvjsbJ83WGcth7NpagfroE6BgtDXdupKco5F9Ywaocb1Rr7x1jvNUj L/VQ== MIME-Version: 1.0 X-Received: by 10.224.168.203 with SMTP id v11mr42462443qay.57.1395228347321; Wed, 19 Mar 2014 04:25:47 -0700 (PDT) In-Reply-To: References: Date: Wed, 19 Mar 2014 12:25:47 +0100 Message-ID: Subject: Re: How to use a service immediately after its activation? From: Bertrand Delacretaz To: users@felix.apache.org Content-Type: text/plain; charset=UTF-8 Hi, On Tue, Mar 18, 2014 at 10:22 PM, Neil Bartlett wrote: > ...Whatever you're trying to do in your special listener, wouldn't it be > better done inside the same bundle as the service?... You're right, and this is similar to what Bruce suggests - the bundle's initialization code can look for initializer services using a whiteboard pattern, and call them before making the actual service available. To answer Marcel's question about the use case, the app in question is Sling-based and uses a content repository service. When upgrading the app you might need to make some changes to the content before the new version of the app starts working with the content repository. So yes, making this part of the content repository service design makes absolute sense. David B's hooks suggestion also looks interesting, as a generic way of talking to services early in the setup phase. Thanks everybody for the pointers! -Bertrand --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@felix.apache.org For additional commands, e-mail: users-help@felix.apache.org