I need to get the ServletContext
from inside a @ServerEndpoint
in order to find Spring ApplicationContext
and lookup for a Bean.
For the moment my best approach is to bind that bean in the JNDI naming context and lookup it in the Endpoint
. Any better solution is welcome.
I'm also looking for a reasonable way to sync servlet's HttpSession
with websocket's Session
.