[ https://issues.apache.org/jira/browse/MYFACES-4684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17895646#comment-17895646 ]
Melloware commented on MYFACES-4684: ------------------------------------ No this is open. So I talked to the Quarkus team and they said the WebSocket spec doesn't mention anything about supporting SessionScoped or CDI. From the Quarkus team... Clement Escoffier What surprised me a bit is the relation between the websocket and the session scoped - I can't remember if this is specificed in Jakarta WebSocket (it's somethign we did in websocket next, but we are not implementing Jakarta WebSocket). 02:50 The sepc only mention the access to the HTTP session (basically the upgrade HTTP request) - no relation with SessionScoped. 02:51 Looks like MyFaces may use an unspecified (but which makes sense) behavior. Martin Kouba 02:52 I can't remember if this is specificed in Jakarta WebSocket I don't think it is... the spec only mentions that endpoints must support injection: https://jakarta.ee/specifications/websocket/2.2/jakarta-websocket-spec-2.2#websocket-endpoints-and-dependency-injection Clement Escoffier 02:53 yes, that's what I'm seeing too. Martin Kouba 02:53 there's nothing about scopes Clement Escoffier 02:53 The last section about the relation between the websocket and HTTP is interesting. Martin Kouba 02:55 do you mean the HttpSession.getAccessor() thing? Clement Escoffier 02:58 yes. 02:58 that's where it blurs the boundary. 02:58 the spec mentions the HTTP "session" (which is unrelated to the session scoped) 02:59 at the moment, we do not have HTTP "session" - @Ladislav Thon did some work on that a few month (maybe a year) ago. Ladislav Thon 03:00 yeah, it's been almost a year > Quarkus: WebSockets not working > ------------------------------- > > Key: MYFACES-4684 > URL: https://issues.apache.org/jira/browse/MYFACES-4684 > Project: MyFaces Core > Issue Type: Bug > Components: Extension Feature > Affects Versions: 4.0.2, 4.1.0-RC2 > Reporter: Melloware > Assignee: Melloware > Priority: Major > Attachments: image-2024-10-16-08-49-21-201.png, > image-2024-10-16-13-37-32-161.png > > > Using a WebSocket in Quarkus throws this > {code:java} > Suppressed: java.lang.NullPointerException: Cannot invoke > "org.apache.myfaces.push.cdi.WebsocketScopeManager$AbstractScope.isChannelAvailable(String)" > because the return value of > "org.apache.myfaces.push.cdi.WebsocketScopeManager.getScope(String, boolean)" > is null > at > org.apache.myfaces.push.WebsocketComponentRenderer.encodeEnd(WebsocketComponentRenderer.java:148) > at > jakarta.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:634) > at > jakarta.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:523) > at > jakarta.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:519) > at > jakarta.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:519) > at > org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1779) > at > org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:316) > at > org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:122) > at > org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241) > at > jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:225) > at > io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) > at > io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:63) > at > io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) > at > io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) > at > io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:67) > at > io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:133) > at > io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) > at > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > at > io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) > at > io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:65) > at > io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) > at > io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) > at > io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) > at > io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) > at > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > at > io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) > at > io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:247) > at > io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:111) > at > io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:108) > at > io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) > at > io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) > at > io.quarkus.undertow.runtime.UndertowDeploymentRecorder$9$1.call(UndertowDeploymentRecorder.java:626) > at > io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) > at > io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:152) > at > io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49) > at > io.quarkus.undertow.runtime.UndertowDeploymentRecorder$1.handleRequest(UndertowDeploymentRecorder.java:125) > at > io.undertow.server.Connectors.executeRootHandler(Connectors.java:284) > at > io.undertow.server.DefaultExchangeHandler.handle(DefaultExchangeHandler.java:18) > at > io.quarkus.undertow.runtime.UndertowDeploymentRecorder$5$2.run(UndertowDeploymentRecorder.java:441) > at > java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) > at > java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) > at > io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582) > at > org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513) > at > org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538) > at > org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29) > at > org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29) > at > io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) > at java.base/java.lang.Thread.run(Thread.java:840) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)