>>>>> Steinar Bang <s...@dod.no>:
>>>>> David Jencks <david.a.jen...@gmail.com>:

>> One point some ds beginners miss is that if your component provides a
>> service by default it is delayed and won’t be instantiated until the
>> service is used.

> Ahh!  That explains why the first component isn't instantiated until the
> second bundle is loaded, and why the second component shows up only as

Another thing this explains: why the pax exam integration test worked,
while actually running the app in karaf didn't work.  Using @Inject in
the pax exam integration test registers an interest for the service
provided by OSGi bundle number two.

>> This laziness is great but can be confusing. Specify immediate=true if
>> you want to see all the components instantiated as soon as all their
>> dependencies are satisfied.

> Thanks! I will try this.

Specifying immediate=true made everything work, thanks!

Reply via email to