Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337211 - Enhance runtime artifact model to work with framework hooks
Summary: Enhance runtime artifact model to work with framework hooks
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: 3.0.0.M01   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: 3.0.0.M04   Edit
Assignee: Glyn Normington CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 338521 (view as bug list)
Depends on:
Blocks: 337233 338159
  Show dependency tree
 
Reported: 2011-02-15 09:21 EST by Glyn Normington CLA
Modified: 2011-04-11 11:18 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glyn Normington CLA 2011-02-15 09:21:00 EST
Since there is no longer a surrogate bundle, some wires disappear into the kernel and cannot be traced via the RAM. The RAM should be extended to include the kernel and potentially other regions. Mutations must not be allowed via the RAM on kernel bundles.
Comment 1 Chris Frost CLA 2011-02-15 11:34:30 EST
A temporary work around is in place for uses of the RAM.

org/eclipse/virgo/kernel/model/internal/KernelRegionBundle

Will now be returned whenever a dependency strays in to the Kernel region.
Comment 2 Glyn Normington CLA 2011-03-01 05:57:21 EST
*** Bug 338521 has been marked as a duplicate of this bug. ***
Comment 3 Glyn Normington CLA 2011-03-01 06:13:27 EST
The RAM for the 2.x kernel is specified in http://git.eclipse.org/c/virgo/org.eclipse.virgo.documentation.git/plain/design-docs/kernel/kernel.pdf.
Comment 4 Glyn Normington CLA 2011-03-02 04:23:56 EST
Implementation Notes

The kernel deployer code ensures that at most one bundle may be deployed into the kernel region with a given symbolic name and version. (If there are cases where additional copies of a bundle are auto-provisioned, then this is a bug which should be fixed.) So we can rely on looking up user region bundles using symbolic name and version.

We need to make sure BundleDependencyDeterminer includes kernel bundles in its dependency calculation.

KernelRegionBundle and KernelRegionFauxQuasiLiveBundle should be deleted.

KRB is constructed only by NotifyingRuntimeArtifactRepository and returned when the getArtifact method cannot find an artifact (not just a bundle - this is a bug) with the given type, name, and version. This method can be changed to return null if the artifact is not found. The only caller where this matters is BundleDependencyDeterminer which should test for the null return value and return a new Artifact wrapping the QuasiBundle. 

KRFQLB is constructed only in the constructor of StandardQuasiLiveBundle in the case where a null 3rd Bundle parameter has been supplied. The callers of the SQLB constructor obtain the 3rd Bundle parameter in one of two ways:

1. StandardQuasiLiveFramework uses this.bundleContext.getBundle(bundleId). If the system bundle context is used instead, then the bundle should be returned. In earlier testing, this did not appear to be the case, which indicates a possible bug in the region bundle find hook.

2. StandardQuasiLiveService uses this.quasiFramework.getBundle(user.getBundleId()) which uses SQLF covered by item 1.
Comment 5 Glyn Normington CLA 2011-03-10 07:16:18 EST
Note that more workaround code is in StandardRamAccessorHelper - search in there for bug 337211.
Comment 6 Glyn Normington CLA 2011-04-11 11:17:51 EDT
In addition to adding regions into the runtime artifact model, I added KernelModel mbeans to augment the runtime model.