You can use:
bundleContext.getBundles()[0].getState()

Below you can find an enumeration which shows usage of getState result.
https://github.com/splatch/karaf-webconsole/blob/develop/osgi/core/src/main/java/org/apache/karaf/webconsole/osgi/core/shared/State.java

Best regards,
Lukasz


Wiadomość napisana przez homeration w dniu 23 mar 2012, o godz. 12:12:

> Hi,
> 
> I develop a bundle that scans a list of bundles and controls their
> registration states.
> How can I determine that a bundle is unregistered ?
> 
> Currently, I seek all service reference's from a bundle contextand try to
> determine their
> registration state. Unfortunately, I did not find any property that allows
> me to determine that.
> 
> Have you any idea to do this?
> 
> Thanks,
> 
> Christophe.
> 
> --
> View this message in context: 
> http://karaf.922171.n3.nabble.com/Retrieves-bundle-registration-state-tp3851245p3851245.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to