Resolving Ambiguity for Import-Package [message #114785] |
Mon, 21 July 2008 03:30  |
Eclipse User |
|
|
|
Originally posted by: goetz.jexam.gmail.com
Hi,
if one has a bundle in version 2 and clients written against version 1 auf
this bundle one needs to provide an adapter. This adapter needs to look
like bundle version 1 and delegate calls to version 2.
The problem is, that usually version 1 and 2 have classes which names were
not changed between the versions and hence are called equaly. Using
Import-Package or Required-Bundle doesn't work, because of this ambiguity.
Is there a solution for resolving ambiguity, yet ?
Regards
Sebastian
|
|
|
|
|
|
|
|
|
|
Re: Resolving Ambiguity for Import-Package [message #115329 is a reply to message #115304] |
Fri, 25 July 2008 06:03  |
Eclipse User |
|
|
|
Originally posted by: goetz.jexam.gmail.com
Gunnar Wagenknecht wrote:
> Bundle A:
> Import-Package: my.api;version="[1.0.0,2.0.0)"
Import-Package: my.api;version="1.0.0"
> Bundle B:
> Require-Bundle: C;bundle-version="2.0.0"
> Export-Package: my.api;version="1.0.0"
> Bundle C:
> Export-Package: my.api;version="2.0.0"
> No?
The problem is, that there are no different parts, the whole package is to
be exported/imported in different versions. Bundle B contains package
my.api itself. Bundle A shall import only classes defined in this package
of Bundle B. Bundle C too contains this package, but in another version. A
shall not see the package from C, but B shall see the package of C. For
Example class my.api.C1 defined in B shall have a delegation field to
my.api.C1 defined in C.
Its solvable using reflection, but i hoped, that OSGi provides direct
support for this.
Who can I ask where to start getting familiar with the equinox sources,
especially regarding the classloading/bundle dependency resolution?
Regards
Sebastian
|
|
|
Powered by
FUDForum. Page generated in 0.29915 seconds