OK so to find out if the bundle is fragment, I should check if it has 
"Fragment-Host" header? 

I've made quick test and it seems to be the solution. 

Best regards,
Lukasz Lech


-----Original Message-----
From: Łukasz Dywicki [mailto:[email protected]] 
Sent: Mittwoch, 12. September 2018 10:34
To: [email protected]; Lukasz Lech <[email protected]>
Subject: Re: BundleState: Fragment

Dear Lukasz
Fragment bundles are never active because they are attached to fragment host 
(pointed via manifest header).

There is no "fragment" state for bundle because it is type of bundle itself. 
You might have normal bundles and fragments attached to them.
Highest state fragment bundle can have is resolved - meaning that it is 
attached to its host.

See wider description in specs:
https://osgi.org/specification/osgi.core/7.0.0/framework.module.html#framework.module.fragmentbundles

Kind regards,
Lukasz


On 9/12/18 10:08 AM, Lukasz Lech wrote:
> I'm checking health status of my Karaf container using BundleService.
> 
>  
> 
> I expect all bundles to be Active, however, 2 of them are Resolved.
> 
>  
> 
> Web Console shows their status as Fragment, however, 
> org.apache.karaf.bundle.core.BundleStatus doesn't contain such state, 
> and probably this is why it is casted to Resolved.
> 
>  
> 
> How can I find out that bundle is a Fragment and will never be Active?
> 
>  
> 
> Best regards,
> 
> Lukasz Lech
> 
>  
> 

Reply via email to