[ 
https://issues.apache.org/jira/browse/FELIX-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13756316#comment-13756316
 ] 

Richard S. Hall commented on FELIX-4212:
----------------------------------------

I'm not sure what you want is correct for BundleWiring.getCapabilities(), etc. 
From the OSGi R5 API:

"java.util.List<BundleCapability> getCapabilities(java.lang.String namespace)

    Returns the capabilities provided by this bundle wiring.

    Only capabilities considered by the resolver are returned. For example, 
capabilities with effective directive not equal to resolve are not returned."

There is similar wording for getRequirements().

I think you'd have to look into BundleRevision.getDeclaredCapabilities(), etc. 
I'm not 100% certain this works in Felix either, but it makes more sense than 
getting them from BundleWiring since the wiring is the result of the resolver 
and what you are looking for is stuff the resolver ignores.
                
> Felix framework doesn't provide access to Generic Requirements and 
> Capabilities with effective:=active
> ------------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-4212
>                 URL: https://issues.apache.org/jira/browse/FELIX-4212
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-4.2.1
>            Reporter: Timothy Ward
>            Priority: Critical
>
> I am trying to access Require-Capability and Provide-Capability metadata from 
> my bundle's manifest using the BundleWiring API. Most capabilities show up 
> fine, but none of the ones with effective:=active are present. I understand 
> that these capabilities are ignored by the resolver, and may not have any 
> wirings, but I expect them to show up anyway. This avoids me having to 
> provide my own parsing code to turn the manifest entries into Requirements 
> and Capabilities.
> Having checked with the OSGi Core Platform Expert group, active time 
> requirements and capabilities really should be showing up in the 
> BundleWiring. My guess is that this will be easy to fix!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to