[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Equinox weaving and OSGI Resolver Hooks

I created a bug for equinox weaving: https://bugs.eclipse.org/bugs/show_bug.cgi?id=356284

Regarding the equinox regions bundle: I did not know it yet and I implemented my own set of framework hooks. I had a look at equinox regions now and I will definitely try it out, it sounds promising. Thanks for the hint.

Cheers, Tobias.

2011/8/30 Thomas Watson <tjwatson@xxxxxxxxxx>

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?


Inactive hide details for Martin Lippert ---08/30/2011 06:35:39 AM---Hey Tobias!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

Hey Tobias!

> I am using a org.osgi.framework.hooks.resolver.ResolverHook in order
> to create compartments or regions in the OSGI runtime. These
> compartments resolve independently of each other.
> In conjunction with equinox weaving I have the problem that the
> equinox weaving implementation does not consider the ResolverHooks
> available in the the runtime when it resolves the supplement bundles.
> This leads to the situation that bundles from one compartment are
> supplemented with bundles from another compartment which should not
> happen in my use case.
> Maybe it would make sense to call the available OSGI resolver hooks in
> order to check if the possible combinations of supplemented and
> supplementer bundles are valid (Maybe this could be implemented in
> org.eclipse.equinox.weaving.hooks.SupplementerRegistry.isSupplementerMatching(..)).

I haven't looked at the ResolverHooks in detail yet. Therefore I don't
know exactly what changes would be necessary, but I think the
SupplementerRegistry would be the place to look for when the
compartments or regions should also be respected by the supplementer

Would you like to take a deeper look at this and maybe provide a patch?
That would be really great!!! I can help you whenever you need more
details and/or other help.


equinox-dev mailing list

equinox-dev mailing list

GIF image

GIF image