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

Bug 349944

Summary: [region] [rfc 174] Implement New Bundle Collision Hook
Product: [Eclipse Project] Equinox Reporter: John Ross <jwross>
Component: ComponentsAssignee: equinox.components-inbox <equinox.components-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: glyn.normington, tjwatson
Version: 3.7   
Target Milestone: Juno M2   
Hardware: All   
OS: All   
URL: https://www.osgi.org/members/svn/documents/trunk/rfcs/rfc0174
See Also: https://www.osgi.org/members/bugzilla/show_bug.cgi?id=2020
Whiteboard:
Bug Depends on: 348967    
Bug Blocks:    

Description John Ross CLA 2011-06-21 09:32:28 EDT
RFC 174, currently in process, will introduce a new Bundle Collision Hook. The primary purpose of this hook is to provide a way to tell the framework what it should do when encountering a bundle with the same bsn and version. This new hook was necessary because the existing Find Hook could not be used during a bundle update because there is no valid bundle context at that time. The hook implementation will need to filter out any candidate having the same bsn and version as another bundle within the targeted region.
Comment 1 Thomas Watson CLA 2011-06-21 12:36:22 EDT
bug348967 is the bug used to implement the Bundle Collision Hook support in the framework.  As John points out region digraph will need to be updated to take advantage of the new hook.  I suspect we will need to do this in such a way that regions continues to work on an R4.3 Framework which does not have the CollisionHook available.
Comment 2 Thomas Watson CLA 2011-08-24 14:56:40 EDT
Should look at doing this for M2.
Comment 3 Thomas Watson CLA 2011-09-02 16:03:10 EDT
I released an implementation of the collision hook with commit:

http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/commit/?id=620f7deeb1be737dca403e2ae3c84d7a8ebe5752

In order to allow region bundle to continue to run on equinox 3.7 I had to make some changes to use the StandardRegionDigraph internally instead of the RegionDigraph interface.  This was to avoid adding a method to get the bundle CollisionHook.  Glyn, I felt it was important to you to ensure region continued to run on Equinox 3.7 because I am not sure when Virgo can move up.  Plus 3.8 is not releasing until June 2012 so it would mean you would not be able to use the latest region implementation for a long time.