0

I'm using AtmosphereFramework's WebSockets, i've got a class annotated like this:

@WebSocketHandlerService(path = "/gts")
public class GameSocket extends WebSocketHandlerAdapter {

@Override void onOpen(WebSocket webSocket) {...}
@Override void onTextMessage(WebSocket webSocket, String message) throws IOException {...}

And i'd like to know if all calls (onOpen, onTextMessage, ...) from a SINGLE socket connection are guaranteed to use one and only one instance of GameSocket.

Else, i'm searching a way to keep user sessions into this JavaEE/Glassfish/EJB3 Websocket only environment.

Luca Vitucci
  • 3,674
  • 4
  • 36
  • 60

1 Answers1

1

(1) Yes, only one instance

(2) There are some known issue with Session and GlassFish. Try it and if you see some issue, just come to the mailing list and I will describe how you can use the AtmosphereConfig.properties() to store state.

(I am Atmosphere's creator).

halfer
  • 19,824
  • 17
  • 99
  • 186
jfarcand
  • 1,705
  • 9
  • 6