Hi,

Am 12.06.2012 um 14:38 schrieb fabiolf:

> Hello!
> 
> In OSGI, the call to Bundle.start() is asynchronous.

I may be terribly wrong, but me thinks that Bundle.start is synchronous unless 
you have lazy activation in which case the actually only starts, when its used.

> So when I issue the
> call, I have to code something to let me know when the Bundle is really
> started. The first thing that came to my mind is to create a polling process
> to check if the bundle is already started, but it is not the most efficient
> and quick way to achieve that. I need to know as soon as possible the moment
> when the bundle is started. I was thinking about listening to bundle start
> events and then filter to find my bundle start event. Is it possible? Is it
> efficient? How can I do it?

You can certainly listen for the bundle start event. But, as I said, this is 
not required since the bundle starts synchronously.

Of course, there is no guarantee, that no asynchronous actions take place as a 
result.

Regards
Felix

> 
> Thanks in advance!
> Fabio
> 
> --
> View this message in context: 
> http://apache-felix.18485.n6.nabble.com/How-is-the-most-efficient-way-to-know-when-a-bundle-is-started-tp4997996.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to