Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348967 - [R4.4] Handle new option "managed" for org.osgi.framework.bsnversion configuration property
Summary: [R4.4] Handle new option "managed" for org.osgi.framework.bsnversion configur...
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: Juno M2   Edit
Assignee: Thomas Watson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 349944 354191
  Show dependency tree
 
Reported: 2011-06-09 17:13 EDT by Thomas Watson CLA
Modified: 2011-08-08 17:36 EDT (History)
3 users (show)

See Also:


Attachments
patch and tests (22.47 KB, patch)
2011-06-10 17:12 EDT, Thomas Watson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2011-06-09 17:13:37 EDT
If a new bundle is being installed for which there already is an installed bundle with the same BSN/Version then the following will be done when org.osgi.framework.bsnversion=managed

In the bsn/version check we ask the find hooks, can the installing bundle
context see any of the collection of already installed bundles with the same
bsn/version as the about to be installed bundle.  In this case the
Collection<Bundle> will contain all the bundles with the requested BSN/version
of the about to be installed bundle.  If at the end of the bundle find hooks
call the Collection<Bundle> is empty then the install succeeds; otherwise the
insetall fails with a REJECTED_BY_HOOK BundleException.

Note that the find hooks are only consulted if "managed" is used.
Comment 1 Thomas Watson CLA 2011-06-10 17:12:49 EDT
Created attachment 197823 [details]
patch and tests

Unfortunately it did not turn out to be feasible to use the bundle FindHook to accomplish this.  I needed to introduce a new bundle CollisionHook.  This patch does that in the existing org.osgi.framework.hooks.bundle package.  I am proposing this back to OSGi in RFC 174.  Note that this is provisional and very early work.  I am simply attaching the patch here so I don't lose the prototype work I have done so far.
Comment 2 Thomas Watson CLA 2011-08-04 14:29:07 EDT
RFC 174 is moving forward.  I will revisit this patch and plan to get it ready for M2.
Comment 3 Thomas Watson CLA 2011-08-08 16:08:36 EDT
I merged an updated patch to master with:

http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=fe711b408d3523f680c4e356221369581057e6ce