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 <
[email protected]> wrote:

> Hi,
>
> On Tue, Mar 18, 2014 at 10:22 PM, Neil Bartlett <[email protected]>
> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to