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

Bug 333193

Summary: Framework hooks should allow bundles to be installed in any region using BundleContext.installBundle
Product: [RT] Virgo Reporter: Glyn Normington <glyn.normington>
Component: runtimeAssignee: Project Inbox <virgo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: 3.0.0.M01   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 333189    
Bug Blocks: 330776    

Description Glyn Normington CLA 2010-12-24 07:28:05 EST
Currently, there is no good way to decide which region a bundle should belong to, so a static approach is taken where the first few bundles installed comprise the kernel region and any installed subsequently comprise the user region. This does not allow bundles to be added to the kernel region after the user region has been created and it does not allow multiple user regions to be implemented.

This requires a bundle install hook which will allow a bundle being installed to "inherit" the region of the bundle doing the install. See Equinox bug 333189.

Of course, a special purpose API could be used to approximate the required behaviour, but this would be race-prone as BundleContext.installBundle adds the new bundle to the framework's collection of bundles before returning. So the new bundle could be passed to the framework hooks, such as the bundle find hook, before it has been associated with its region.
Comment 1 Glyn Normington CLA 2011-02-04 09:59:01 EST
This was implemented using the bundle event hook.