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_r243291296
##########
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:
Hm, maybe you should move all activation after registering the main servlet
into the async block and add a gate so that you block all calls to service()
until the async registration is done?
----------------------------------------------------------------
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