The startup of dependency injection frameworks like iPojo or blueprint happens after the bundle start. So this is really asynchronous. The question is why do you need to know when the component is up?

Do you want to use it as soon as it is up? If yes then simply reference a service and make the reference mandatory. You can also use a ServiceTracker and react on the service coming up.

Can you explain a bit more what you try to achieve? Pehaps there are better ways than waiting for the bundle.

Christian

Am 12.06.2012 22:00, schrieb fabiolf:
Hi all,

I'm sorry, I did a terrible mistake here! Of course you and Richard are
right, the Bundle.start() is not asynchronous. I got myself confused here!
Let me explain it.

I am using iPOJO to make my life easier when binding services. So, I declare
the iPOJO components in my bundle and, in runtime, the component instances
are created. When all their handlers are valid, the instance is then
validated.

So, the question I wanted to have made in first place was: how can I know,
from the moment I start the iPOJO components bundle with Bundle.start(),
that its component instance is validated (without having to code something
in the validate callback of the component)? The process I wanted to have
said that is asynchronous is the iPOJO instance validation, not the
Bundle.start() call... sorry about that. (I have fixed the message subject
to reflect the real problem)

At first time I thought about using some kind of listener, but it would have
to be an iPOJO listener, right? Because the component instance lifecycle is
managed by iPOJO, right?

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-tp4997996p4998002.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]



--

Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com


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

Reply via email to