Unregister Resource Servlets of Bundles to be Removed

Steps to reproduce

Trying to replace a bundle with a static resource servelet registered by
Opencast (e.g. runtime-info-ui-ng or admin-ui) will result in an
org.osgi.service.http.NamespaceException when the updates bundle is
registered again since the servlet registered by the first bundle never
got removed and its alias is hence already in use.

Example: https://asciinema.org/a/208822

This patch ensures that servlets are unregistered as soon as the
associated bundle is unloaded. This makes it easily possible to
live-deploy a new version of that bundle, e.g. using Karaf's
`bundle:watch` feature without the need for restarting Opencast in the
process.

Status

Assignee

Lars Kiesow

Reporter

Lars Kiesow

Severity

Incorrectly Functioning With Workaround

Tags (folksonomy)

None

Components

Affects versions

7.0

Priority

Major
Configure