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 (Commented) (JIRA)" <ji...@apache.org> on 2011/12/31 14:28:31 UTC

[jira] [Commented] (SLING-2347) Startup filter: allow requests to be rejected with a 503 during startup

    [ https://issues.apache.org/jira/browse/SLING-2347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178002#comment-13178002 ] 

Felix Meschberger commented on SLING-2347:
------------------------------------------

Interesting.

Some notes:
 -- You should probably not cast the DEFAULT_FILTER_ACTIVE_PROP property to boolean - the property might be of another type (e.g. string)
 -- I would use the whiteboard pattern: Remove the StartupFilter interface but keep the ProgressProvider interface top-level. The StartupFilterImpl (probably rename to StartupFilter after StartupFilter removal) should have a dynamic, multiple @Reference to ProgressProviders.

Using the whiteboard pattern makes the implementation of the StartupProgressProvider services simpler (they just register or unregister without caring whether they are really used or not)
                
> Startup filter: allow requests to be rejected with a 503 during startup
> -----------------------------------------------------------------------
>
>                 Key: SLING-2347
>                 URL: https://issues.apache.org/jira/browse/SLING-2347
>             Project: Sling
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Bertrand Delacretaz
>            Assignee: Bertrand Delacretaz
>            Priority: Minor
>
> To provide a clear status during startup, especially when that implies automatic application or content upgrades, I have implemented a simple filter that causes all Sling requests to return a 503 status until another component decides that Sling is ready to accept requests.
> The use case is to start the bundle that contains this filter at start level lower than that of the Sling engine, so that the 503 filter kicks in as soon as the Sling servlet starts, with a simple API to provide progress information (returned in the body of the 503 response) and remove the filter when the system is ready.
> I'll add that filter as a new bundle under contrib/extensions.

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