equinox-dev-bounces@xxxxxxxxxxx wrote on 03/31/2006
> 1. The only difference between Require bundle and Import Package is
> granularity. There are -no- lifecycle differences. Actually,
> require bundle is internally transformed to the same
wires as import
> package uses. Note that also packages should be versioned.
> there are no differences but granularity.
There is one other key difference in Require-Bundle
vs Import-Package. When multiple bundles export parts of a "split"
package then the only way to combine all the parts into a "full"
package it is for an aggregate bundle to require all the bundles which
export the "split" package and then the aggregate bundle exports the
This is possible with Require-Bundle because the class/resource
lookups do not terminate at a Require-Bundle wire like they
do with Import-Package wires. Also Import-Package only
allows you to import from a single source bundle (you cannot specify the
same package more than once in an Import-Package statement).
So a scenario where you must use Require-Bundle is
when you are splitting a single bundle into multiple bundles and
you are required to split a package. In this case the strong
coupling is necessary and natural to ensure the original "complete"
bundle can aggregate the split content.