enapps-enorman commented on code in PR #310:
URL: https://github.com/apache/felix-dev/pull/310#discussion_r1584068475


##########
http/jetty12/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java:
##########
@@ -253,9 +253,12 @@ private void initializeJetty() throws Exception
             loginService.setUserStore(new UserStore());
             this.server.addBean(loginService);
 
-            ServletContextHandler context = new 
ServletContextHandler(this.config.getContextPath(),
+            ServletContextHandler context = new 
ServletContextHandler(this.config.getContextPath(),                    
                     ServletContextHandler.SESSIONS);
 
+            // To support WebSockets via 
https://github.com/apache/felix-dev/pull/310
+            context.setCrossContextDispatchSupported(true);

Review Comment:
   I wonder if there is some way that the (JETTY_WEBSOCKET_CONTAINER_ATTRIBUTE 
and/or ServerContainer.class.getName()) attribute could be copied into to (or 
re-routed from) the  SharedServletContextImpl object that is the delegatee for 
all of the PerBundleServletContextImpl objects.
   
   If that is possible and works then we wouldn't have to mess with the cross 
context dispatch flag.  I am not sure what the implications or side effects of 
that might be.  Plus we would be able to lookup the websocket container 
directly from the PerBundleServletContextImpl and not have to switch to the 
root context which seems like an implementation detail that the downstream 
developers shouldn't need to know.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@felix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to