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

Felix Meschberger updated SLING-2174:
-------------------------------------

    Attachment: SLING-2174.patch

Proposed patch implementing the new mechanism and proper startup firing the 
FRAMEWORK_STARTED event only after reaching the actual start level

> 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
>             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

        

Reply via email to