felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Bartlett <njbartl...@gmail.com>
Subject Re: How to use a service immediately after its activation?
Date Wed, 19 Mar 2014 11:36:39 GMT
Bear in mind that the Service Hook approach is not a panacea: there is
still no guarantee that the hook will be installed before other consumers.
To provide this kind of guarantee you would have to resort to bundle start
ordering.

Regards,
Neil


On Wed, Mar 19, 2014 at 11:25 AM, Bertrand Delacretaz <
bdelacretaz@apache.org> wrote:

> Hi,
>
> On Tue, Mar 18, 2014 at 10:22 PM, Neil Bartlett <njbartlett@gmail.com>
> 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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message