@ServerEndpoint("/websocket/blah")
public class LeadChangeWebsocketEndpoint {
@Inject
private SessionScopedBean bean;
@OnOpen
public void onOpen(Session session) {
bean.takeWebsocketAndDoSomething(session);
}
....
}
That code results in an exception. How does one associate a websocket with a user's session? I can't find any documentation explicitly stating what the CDI scope of a @ServerEndpoint bean is, even though it is capable of receiving CDI injections.
Aucun commentaire:
Enregistrer un commentaire