Hi all,

Thanks to OSGi, we can update almost all components of a Sling-based
system during runtime without requiring Sling to be stopped and
restarted. By "almost" I mean, that currently we cannot update the OSGi
framework implementation itself.

I have devised a concept and prototype to support such a framework
update at [1]. The basic idea is, that the Sling Main class or Sling
Servlet does not start the framework directly but creates a new
URLClassLaoder, which has just the framework (plus some helper). The
framework is the loaded and started from this class loader.

When the framework is stopped, the launcher code in the Sling Main class
or Servlet may react to this situation and restart the framework if
required. If the framework has been updated (that is the system bundle's
update(InputStream) method has been called), the framework code is
replaced and started again.

Besides known when the framework is stopped, this new mechanism provides
support for two important cases:

  * Controlled restart of the framework, which is required if
    framework extension fragments are updated or removed
  * Update of the framework code, which of course also requires
    a full restart.

Please comment.

Thanks and Regards
Felix

[1] http://cwiki.apache.org/SLING/updating-the-sling-launcher.html

Reply via email to