Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The Bundle Provider adds support to the Apache Sling OSGI Installer Framework that installs Resources provided by OSGI Bundles.
Currently Bundle Events are processed like follows:
- STARTED: all installable resources will be installed
- STOPPED: all installable resource will be uninstalled
- UPDATED: all installable resources will be first uninstalled and than installed
The issue is with uninstalling resources if a Bundle is STOPPED because this event is also sent for all bundles if the OSGI Environment is shutting down. The affected resources will be installed again on the next start however this behavior is not intended and can cause a lot of side effects such as that Services that are created by installed configurations will get different Service PIDs on every restart.
To solve this uninstalling of resources MUST only be performed if a Bundle is UNINSTALLED. This event is only sent if a Bundle is programmatic or manually removed form the OSGI environment and can be never sent by a normal life cycle activity.
Thanks to David Riccitelli in helping me to identify this as source for a lot of hart to track down bugs within Stanbol.
Attachments
Issue Links
- is superceded by
-
STANBOL-532 Bundle Provide (Sling installer plugin) should again uninstall resources if Bundles are STOPPED. However it MUST NOT uninstall resoruces when the System Bundle not Active
- Closed