Hi Clement,

clement escoffier wrote
> 
> If you create the instance directly using the API, you can register an
> 'InstanceStateListener'. However, I would recommend to use services to
> detect the instance validation. For example, tracking the apparition of
> the Architecture service, or the registration of a 'business' service is
> probably easier and avoids to deal with iPOJO specific behavior.
> 

I saw that InstanceStateListener, but I cannot guarantee that I will always
create the instance through API. I can receive a JAR containing some
components and the framework will initialize it for me. So I think I cannot
use the InstanceStateListener as I will need the Factory to register the
listener.

I liked your other suggestion. If I create an Architecture[] member in my
class and let iPOJO bind it for me, it will add another register in the
array when the instance I just started is ready? Maybe I could build a
notification system based on that behavior. How can I track new inserts into
this array? Can I be notified when that happens?

I'm sorry, what do you mean by the registration of a 'business' service?

Thanks!
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-tp4997996p4998043.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]

Reply via email to