karlpauls commented on a change in pull request #6: SLING-8187 - Deadlock in 
SlingMainServlet after SLING-8051
URL: 
https://github.com/apache/sling-org-apache-sling-engine/pull/6#discussion_r243272489
 
 

 ##########
 File path: src/main/java/org/apache/sling/engine/impl/SlingMainServlet.java
 ##########
 @@ -424,6 +426,23 @@ protected void activate(final BundleContext bundleContext,
         servletConfig.put(Constants.SERVICE_VENDOR, "The Apache Software 
Foundation");
         this.servletRegistration = 
bundleContext.registerService(Servlet.class, this, servletConfig);
 
+        // note: registration of SlingServletContext as a service is delayed 
to the #init() method
+        slingServletContext = new SlingServletContext(bundleContext, this);
+
+        // register render filters already registered after registration with
+        // the HttpService as filter initialization may cause the servlet
+        // context to be required (see SLING-42)
+        filterManager = new ServletFilterManager(bundleContext,
 
 Review comment:
   I'm not sure but I think this could leak the slingServletContext before the 
init as IIRC, it will be passed to Filters being tracked and init'ed by the 
ServletFilterManager. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to