Improve initial installation and startup
----------------------------------------

                 Key: SLING-1886
                 URL: https://issues.apache.org/jira/browse/SLING-1886
             Project: Sling
          Issue Type: Improvement
          Components: Launchpad
    Affects Versions:  Launchpad Base 2.2.0
            Reporter: Felix Meschberger


As of SLING-1220 (and thus Launchpad Base 2.1.0) the launcher started the 
framework only into startlevel 1 and the BootstrapInstaller actually checked 
whether framework extension bundles have been installed. If so, the framework 
was restarted. Otherwise the framework was placed into the originally requested 
start level.

As of the OSGi R 4.2 Framework Launcher API, this is not needed any longer 
because we now have a control point during startup where we can install/update 
bundles and decide whether to continue framework startup or restart from 
scratch.

This is how the Framework may now be launched and where we can hook in:

    (1) Instantiate the Framework
    (2) Call Framework.init()
             -- now the system bundle is in the STARTING state
             -- all bundles are "loaded" but not started
    (3) Call Framework.start()
             -- starts the framework
             -- goes into the desired startlevel starting bundles

After calling init() but before calling start() we can now run the 
BootstrapInstaller installing/updating/uninstalling any bundles as instructed. 
After this initial step we can either stop() the framework and restart with 
init() if a framework extension has been installed or call start() to continue 
with the regular startup.

At the end we get the FRAMEWORK_STARTED event as what it is intended for: 
marking the end of the framework startup.

Currently the FRAMEWORK_STARTED event does not mark the end of the framework 
startup. Rather it marks the end of the BootstrapInstaller phase while a later 
STARTLEVEL_CHANGED event actually would mark the end of the framework startup.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to