Currently the web container allows HttpSessions to be serialized and moved between nodes in a distributed server. The purpose it to dynamically balance the load on a distributed server.
So what does this mean for WebSockets in the distributed environment ?
I need to research this, but it seems unlikely that, without cooperation from the client, such distributed deployments close the TCP connection and reconnect it from a different server location. Which would mean that websocket sessions are tied to the node in the cluster. Which has implications on web applications containing web sockets and limits the ability of the server to move an http session around.
The websocket spec will need to define what is allowable for web socket implementations in the distributed Java EE setting. Currently, it looks like web application sessions can only be moved around if there is some cooperating websocket proxy that is fronting the actual TCP connection.