I googled a lot for this problem before posting this question and Accessing HttpSession from HttpServletRequest in a Web Socket @ServerEndpoint is one of the best Questions/Answers I was able to found, but it appears to not solve my problem.
I was able to access HttpSession from websocket in this way, but I can't access the same CDI session bean instances as from normal HTTP requests.
I tried to store in session the HttpSessionContextImpl
Weld instance too and tried to use it on WebSocket side, but it didn't expose previous beans.
Then my question: Is it possible to access the same CDI managed session bean instances in both cases (WebSocket events and HTTP normal requests)?
At the moment it is important for me to have this feature working in Wildfly 9/10, but it would be great to have a general solution working for example on Tomcat > 7 too (using jBoss Weld or any other implementation).
Thanks in advance for your support.