|Re: [equinox-dev] Equinox weaving and OSGI Resolver Hooks|
I don't think the resolver hooks should be called directly by the weaving SupplementerRegistry. Regions/Compartments/Scopes or what ever you choose to call them is not only about isolating the class spaces through the ResolverHook, you also need to isolate the bundles (using org.osgi.framework.hooks.bundle hooks) and services (using org.osgi.framework.hooks.service hooks). I think a supplementer bundle should not supplement another bundle unless it can actually see the other bundle. But in order to figure out if a supplementer bundle can see another bundle the supplementer bundle must have a valid BundleContext. Then you can use the supplementor's BundleContext to call BundleContext.getBundle(<supplementedBundleID>) with the long id of the supplemented bundle. If this returns non-null then the supplementer bundle can see the supplemented bundle.
Do the supplementer bundles need to be active in order to supplement another bundle? They could be lazy activated so that their context is available before they are actually activated.
Please do open a bug about this so we can capture the discussion there. Thanks.
Tobias, you used the term regions, are you familiar with the equinox regions bundle? (http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/tree/bundles/org.eclipse.equinox.region) Is that what you are using, or are you implementing your own framework hooks to create your own concept of regions?
Martin Lippert ---08/30/2011 06:35:39 AM---Hey Tobias!
Martin Lippert <lippert@xxxxxxx>
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
08/30/2011 06:35 AM
Re: [equinox-dev] Equinox weaving and OSGI Resolver Hooks