I can’t understand your description of what your code is trying to do, 
however…..

If you want to work really hard but have it work, use a ServiceTracker (not 
ServiceListener).
If you want to make it easy on yourself, use a DeclarativeServices component.

Practically speaking, you won’t be able to write correct code that deals with 
both existing services and service events, leave that to ServiceTracker. 

thanks
david jencks

> On Jul 23, 2015, at 10:22 AM, Benson Margulies <[email protected]> wrote:
> 
> I'm about to write code in which I set up blueprint injection of the
> bundle context so that I can obtain a service. It occurs to me that
> I've seen, out of my peripheral vision, some talk about issues of
> start order: how to I ensure that my bundle goes looking for the
> service after the source of the service registers it? Do I register a
> service listener, and defer initialization until it sets up?

Reply via email to