Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
JCR Installer 3.0.0
-
None
Description
The BundleResourceProcessor employs a mix of bundle management and package admin tasks, which may cause the framework to get into uncontrolled states:
(1) installOrUpdate may update existing bundles. This causes the bundle to be stopped, updated and started
(2) processResourceQueue calls PackageAdmin.resolve for installed bundles
(3) processResourceQueue starts resolved bundles
(4) processResourceQueue calls PackageAdmin.refreshPackages repeatedly
This all calls way to much into the framework bundle resolution and may be greatly simplified and stabilized:
(1) when a bundle is to be updated it should be stopped before being updated. It will be started later
(2) processResourceQueue only calls refreshPackages if bundles have been uninstalled or updated since the last processResourceQueue
(3) if packages are refreshed the BundleResourceProcessor waits for the refresh to finish and starts any bundles stopped during package refresh as well as newly installed and updated bundles and lets the framework decide on resolution.