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

Christian Schneider edited comment on FELIX-4716 at 12/3/14 2:01 PM:
---------------------------------------------------------------------

Like you explained your example would not work. The problem is that some of the 
Import ranges are wrong.

Every bundle that exports an OSGi API and also uses it should also import it. 
So bundle 1 is wrong as it only exports the API. It also should import it with 
a range of [1,2)

The idea behind this is that if everyone imports the OSGI API then the OSGi 
framework will only select one bundle to export the API and all use the same 
classloader for that package


was (Author: [email protected]):
Like you explained your example would not work. The problem is that some of the 
Import ranges are wrong.

1. Every bundle that exports an OSGi API and also uses it should also import 
it. So bundle 1 is wrong as it only exports the API. It also should import it 
with a range of [1,2)

The idea behind this is that if everyone imports the OSGI API then the OSGi 
framework will only select one bundle to export the API and all use the same 
classloader for that package

> Bundle org.apache.felix.ipojo physically contains OSGi API classes
> ------------------------------------------------------------------
>
>                 Key: FELIX-4716
>                 URL: https://issues.apache.org/jira/browse/FELIX-4716
>             Project: Felix
>          Issue Type: Bug
>          Components: iPOJO
>    Affects Versions: ipojo-runtime-1.12.0
>         Environment: ubuntu 14, karaf
>            Reporter: Karl Leopold
>            Assignee: Clement Escoffier
>
> The _org.apache.felix.ipojo_ bundle imports, exports and physically contains 
> interface-classes of packages _org.osgi.services.cm_ and 
> _org.osgi.services.log_, both with version 1.3.
> I'm running ipojo in karaf 3.0.2. There, these osgi-packages also exists, 
> just in another version.
> Sometimes it happens that a bundle of mine, which has a package-dependency on 
> _org.osgi.services.cm_ is bound to the ipojo-version instead of the one of 
> felix/karaf. Now, the bundle is resolved, but the service dependency on the 
> ConfigurationAdmin can never be resolved, because the implementation is 
> incompatible to the imported interface.
> I can fix that, if I play around with the bundle start levels.
> Anyway, I think it's a bug in iPOJO, because it should not inline any OSGi 
> API packages.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to