You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2011/08/10 10:41:27 UTC

[jira] [Assigned] (SLING-2174) Leverage Framework interface to better control framework startup

     [ https://issues.apache.org/jira/browse/SLING-2174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler reassigned SLING-2174:
---------------------------------------

    Assignee: Carsten Ziegeler

> Leverage Framework interface to better control framework startup
> ----------------------------------------------------------------
>
>                 Key: SLING-2174
>                 URL: https://issues.apache.org/jira/browse/SLING-2174
>             Project: Sling
>          Issue Type: Improvement
>          Components: Launchpad
>    Affects Versions: Launchpad Base 2.3.0
>            Reporter: Felix Meschberger
>            Assignee: Carsten Ziegeler
>             Fix For: Launchpad Base 2.3.2
>
>         Attachments: SLING-2174.patch
>
>
> During startup the bootstrap installer may install, update or uninstall system extension fragments which require the framework to be restarted for the action to properly complete.
> The current implementation solves the problem like this:
>   - initialize the framework (Framework.init())
>   - start the framework into startlevel 1 (Framework.start())
>   - call bootstrap installer for install, update, uninstall
>   - check whether a restart is required:
>       - if yes: restart
>       - otherwise: set start level to originally requested start level
> This is clumsy and dilutes the startup. Particularly the FRAMEWORK_STARTED event is fired without the framework startup to actually have completed.
> To fix this we can solve this easily using the Framework interface like this:
>            Framework tmpFramework = createFramework(notifiable, logger, props);
>             init(tmpFramework);
>             if (new BootstrapInstaller(tmpFramework.getBundleContext(), logger, resourceProvider).install()) {
>                 init(tmpFramework);
>             }
>             tmpFramework.start();
>             this.framework = tmpFramework;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira