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

Bertrand Delacretaz edited comment on SLING-2347 at 1/4/12 4:48 PM:
--------------------------------------------------------------------

Startup filter disabler bundle added in revision 1227218 - its Activator 
disables the StartupFilter if found.

With this, the use case is as follows:

1. Start the startupfilter bundle at a low run level, ideally before the Sling 
servlet

2. Any requests return a 503 status until the filter is disabled

3. StartupInfoProvider services can be registered to provide additional 
information about startup progress, returned with the 503 response

4. Start the startupfilter.disabler bundle at a higher run level, when the 
system is ready to accept requests. This disables the startupfilter bundle's 
Filter service, so there's no performance hit once that's done.
                
      was (Author: bdelacretaz):
    Startup filter disabler bundle added in revision 1227218.

With this, the use case is as follows:

1. Start the startupfilter bundle at a low run level, ideally before the Sling 
servlet

2. Any requests return a 503 status until the filter is disabled

3. StartupInfoProvider services can be registered to provide additional 
information about startup progress, returned with the 503 response

4. Start the startupfilter.disabler bundle at a higher run level, when the 
system is ready to accept requests. This disables the startupfilter bundle's 
Filter service, so there's no performance hit once that's done.
                  
> 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

        

Reply via email to