How are you creating the configuration?

Configuration Admin uses the concept of a bundle location to restrict the 
visibility of a pid to a particular bundle. This almost always trips people up 
when they create the configuration themselves (i.e. in code) as the “default” 
methods bind the configuration to the bundle creating it (rarely what you 
actually want).

Also, if your component is not immediate *and* it provides a service then it 
will not activate until somebody “gets” the service.



> On 18 Oct 2016, at 12:47, Benson Margulies <> wrote:
> Here's my puzzle.
> I have a set of services that all have unsatisfied references to the
> same thing - a vanilla @Reference to the interface WorkerBusService.
> In each case, there is a configuration DTO with an unsatisfied
> reference with name BusConfigured and target null.
> WorkerBusService is implemented by an @Component named BusService.
> it has a required configuration pid and is _not_ immediate. The
> configuration should be there, I see a log message corresponding to my
> code that updates it into place.
> When things time out, BusService has no configuration dtos at all,
> just the description DTO. So, how do I tell why it hasn't started?
> Note that this is an environment where I can't use the shell, so I've
> basically written code that dumps useful output from the introspection
> into a String.
> Note that all this works in a slightly different environment, and I'm
> trying to hone these diagnostic tools rather than brute-force a
> comparison to explain the discrepancy.
> _______________________________________________
> OSGi Developer Mail List

OSGi Developer Mail List

Reply via email to