felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: How is the most efficient way to know when a bundle is started?
Date Tue, 12 Jun 2012 18:54:37 GMT
On 6/12/12 14:38 , fabiolf wrote:
> Hello!
>
> In OSGI, the call to Bundle.start() is asynchronous.

This call is not asynchronous.

> 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?

Yes, sounds like you should be using a BundleListener...perhaps even a 
SynchronousBundleListener if you really cannot be notified 
asynchronously...although you should try not to do too much in 
synchronous callbacks.

-> richard

>
> 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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message