[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [equinox-dev] Regarding Lazy Activation
- From: ajinkya prabhune <ajinkya.prabhune@xxxxxxxxx>
- Date: Wed, 16 Feb 2011 15:36:18 +0100
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Uwp6A55He9MU4VrIO45MPVmZmfkekEPmuHXiyOPlBeWSrI6qzqQUUljA3GCBH+V7qb nLMs/yfMl44LK2m9AsSmrox+36wrUGoNquC+mh30mb3oSc+0zj1j3aBTrBCzXGXM9Hdr ZBV0ukuqQnZ2zHUHEOwP9pnmsOnu4AoLgoNtg=
Super help from both of u. I am now gng through the articles and seeing how it works...
Yes I am trying to use a Service declared in A bundle --- to use in B bundle...
Can I make the A Bundle As Lazy so that when B bundle ask for service in A ... the A bundles gets Active and Registers the Service
will this work ?
Thanks for ur quick reply...
On Wed, Feb 16, 2011 at 3:32 PM, Neil Bartlett <njbartlett@xxxxxxxxx>
Do not do this. It is a common newbie mistake: there should be no
start-ordering dependency between bundles.
You do not state *why* you want B to start after A has started. I
assume that you want to publish a service from A and consume it from
B? The correct way to do this is have B *listen* for the availability
of the service it needs to use, then A and B can be started in any
As Petar points out, using Declarative Services (DS) is a much easier
way to implement services, since it takes care of all the aspects of
listening for availability etc. I strongly recommend that you use DS
instead of coding against the low-level OSGi services APIs.
On Wed, Feb 16, 2011 at 1:36 PM, ajinkya prabhune
> I am quite new to the concept of OSGi and bundles.
> I have this issue.
> For eg - I have 2 bundles
> Bundle A and Bundle B, Bundle A depends on Bundle B
> But I want to start Bundle B only when Bundle A is started...
> what are the ways to do it ? I manually found out the Bundle B using the
> Bundle object and started the Bundle B with bundle.start() but I
> would like to do it without the Java Code. can the Framework Help me.
> I am not sure but how does Bundle ActivationPolicy lazy works ?
> Thank u and regards
> Thank you and Regards
> Ajinkya Prabhune
> equinox-dev mailing list
equinox-dev mailing list
Thank you and Regards