DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
Frequently Asked Questions
Should a bundle import its own packages?
In OSGi R3 this was always the case, since Export-Package implied Import-Package. It was a good idea then and is generally a good idea now.
The whole point is substitutability of providers.
If you import what you export, then the framework is free to choose a different provider of those packages for your bundle, which means that your exports may go unused. However, this is a good thing, because the framework tries to minimize the number of active versions of a given package. This is a good thing because more active versions means divisions in the service registry and less interoperability of bundles.
If your bundle only exports its packages, then it is forcing the framework to use its own version, which can result in more active version of the given package.
In general, the main time you want to export only, is if your bundle is purely a library bundle, then its packages will only be used if they are needed or if you have tightly coupled bundles sharing implementation packages. However, if your bundle will be started and especially if the exported packages define service interfaces or are referenced from service interfaces, then you will want to export and import them.