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

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

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


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

        

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

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-2174.
-------------------------------------

    Resolution: Fixed

I've committed a slightly modified patch in revision 1156070:
- Instead of reusing the framework instance, a new framework instance is created if a restart is required.

In addition I updated all references to latest snapshot of launchpad base and change "Sling" to "Apache Sling" in messages.

> 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

        

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

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger closed SLING-2174.
------------------------------------


Close after release.
                
> 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.4.0
>
>         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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ 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

        

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

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ 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