No, behaviour 2 is correct. The result from getImportingBundles()
represents wirings, and there is no purpose in creating a wiring from
a bundle to itself.

When you see a bundle importing and exporting a package, it means that
the framework has a choice to select either the import OR the export.
Since no other bundle exists that exports p.a, the framework chooses
the export of p.a. from BundleA, therefore allowing both BundleA and
BundleB to resolve.

Regards,
Neil

On Tue, Jul 31, 2012 at 5:51 AM, Shigekuni Kondo
<[email protected]> wrote:
> Hi OSGi Experts,
>
>
> I have a question on ExportedPackage#getImportingBundles().
> # I understand that PackageAdmin is already deprecated (from R4.3)...
>
> [Condition]
> BundleA:
>  Export-Package: p.a version=1.0.0
>  Import-Package: p.a version=1.0.0
> BundleB:
>  Import-Package: p.a version=1.0.0
>
> [Question]
> BundleA and BundleB are installed and started.
> After that, in case that getImportingBundles() is
> called for ExportedPackage which represents p.a,
> which is correct behavior of PackageAdmin?
> ---
> 1. BundleA and BUndleB are included in the returns of
>    getImportingBundles()
> 2. Only BundleB is included in the returns of
>    getImportingBundles()
> ---
> I've checked the behavior by using Equinox (R4.2 base)
> and Felix (R4.2 base), both of results are behavior "2".
>
> On the other hand, The OSGi core spec (R4.2) says as below.
> -----
> 7.5.2.2 public Bundle[] getImportingBundles()
> Returns the resolved bundles that are currently wired to
> this exported package.
> -----
> According to this description, I think the behavior "1"
> seems to be correct...
>
>
> Best regards,
>
> Shigekuni Kondo
>
>
> _____________________________________________
>
>   Shigekuni Kondo
>
>   Promotion Project 1
>   NTT Service Evolution Laboratories
>   NIPPON TELEGRAPH AND TELEPHONE CORPORATION
>
>   1-1 Hikarinooka Yokosuka
>   Kanagawa 239-0847 Japan
>   TEL:+81-46-859-3444
>   FAX:+81-46-855-1282
>   E-mail:[email protected]
> _____________________________________________
>
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to