I'm trying to use websocket on GlassFish 4, but CDI seems doesn't work for WebSocket.
@ServerEndpoint("/websocket")
public class WebSocket {
@Inject
private TestBean bean;
......
}
The bean
will always be null
.
I have searched google, and find some people saying about the same thing, but nome of the solutions could help.