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 2009/06/30 08:44:47 UTC
[jira] Closed: (SLING-1026) SlingServletContext timing issue
[ https://issues.apache.org/jira/browse/SLING-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger closed SLING-1026.
------------------------------------
Resolution: Fixed
Fixed the setup order as described above in Rev. 789581.
> SlingServletContext timing issue
> --------------------------------
>
> Key: SLING-1026
> URL: https://issues.apache.org/jira/browse/SLING-1026
> Project: Sling
> Issue Type: Bug
> Components: Engine
> Affects Versions: Engine 2.0.4
> Reporter: Felix Meschberger
> Assignee: Felix Meschberger
> Fix For: Engine 2.0.6
>
>
> The setup and removal of the SlingServletContext has a timing issue, in that it is registered as a service *before* the sling main servlet is initialized and it is unregistered *after* the sling main servlet has been destroyed. The problem is, that the SlingServletContext is based on the servlet context supplied to the sling main servlet.
> So, if the SlingServletContext is registered like this, NullPointerExceptions may happen when accessing the SlingServletContext.
> The fix is to register the SlingServletContext only *after* the sling main servlet has been initialized and to unregister the SlingServletContext *before* the sling main servlet is destroyed.
> Likewise, the filter registrations must be destroyed *before* the sling main servlet is destryoed. As such the SlingMainServlet deactivation must operate in reverse order of SlingMainServlet activation.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.