Bill Shannon wrote:
> Sahoo wrote:
>> The attached file lists package names that are split across multiple
>> modules in GFv3 workspace. This list may not be totally accurate, so
>> use it as an indicator only. Module owners are requested to ensure
>> that each package is defined by one runtime module only. This is
>> needed so that we can start using *Import-Package* manifest headers
>> to specify dependencies instead of using *Require-Bundle*.
>
> What's the reason for making that change? Is that the OSGi preferred
> approach?
>
Yes, that's the preferred approach in OSGi. Some of the issues with
Require-Bundle are given below:
a) difficult to replace an implementation with another.
b) dependencies of a bundle is not clear - not all of the exported
packages of a bundle may be required by the requiring bundle.
c) difficult to refactor a bundle - again for above mentioned reason.
d) can lead to split-packages where in classes from same package are
loaded from different bundles. Since each bundle has a different class
loader, it can lead to access violation while using "package protected"
symbols.
Thanks,
Sahoo