Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356284

Summary: Equinox weaving should respect ResolverHooks / FindHooks
Product: [Eclipse Project] Equinox Reporter: Tobias Jenkner <tobias.jenkner>
Component: WeavingAssignee: Project Inbox <equinox.weaving-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: gunnar, mlippert, tjwatson
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Tobias Jenkner CLA 2011-08-31 04:10:32 EDT
Build Identifier: 

With ResolverHooks and FindHooks OSGI allows to create regions that are isolated from each other. Equinox weaving currently does not respect this isolation and weaves parts from different regions together.

Equinox weaving should respect this isolation in the future. 


Reproducible: Always
Comment 1 Tobias Jenkner CLA 2011-08-31 04:30:22 EDT
There has been a discussion on the mailing list regarding this topic: 
http://dev.eclipse.org/mhonarc/lists/equinox-dev/msg06954.html

Two ideas came up so far regarding the decision if weaving between two bundles should happen: 
1. Call available org.osgi.framework.hooks.resolver.ResolverHook instances 
   directly. 
   Disadvantage: It seems to be difficult or maybe not possible at all to create
   the input parameters for the resolver hook calls.
   
2. Call org.osgi.framework.BundleContext.getBundle(long) (which will trigger the 
   bundle FindHooks to be called)
   Disadvantage: We have to have a BundleContext available, which means the   
   bundle has to be started in order to do this. The current equinox weaving 
   implementation currently decides whether to weave bundles before they are 
   started (when they are resolved).
Comment 2 Thomas Watson CLA 2011-08-31 08:54:12 EDT
(In reply to comment #1)
> 2. Call org.osgi.framework.BundleContext.getBundle(long) (which will trigger
> the 
>    bundle FindHooks to be called)
>    Disadvantage: We have to have a BundleContext available, which means the   
>    bundle has to be started in order to do this. The current equinox weaving 
>    implementation currently decides whether to weave bundles before they are 
>    started (when they are resolved).

I think it makes sense not to require the candidate bundles being woven to be active before we decide that they should be woven.  But what is required here is the bundles which provide the weaving instructions (weaver bundle?) must be activated so we can get its BundleContext.  This way we can see if the weaver bundle can see the candidate bundle to be woven.
Comment 3 Eclipse Genie CLA 2019-05-14 05:33:05 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.