tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rossen Stoyanchev <>
Subject Re: Websockets with tomcat clustering and session replication
Date Mon, 02 Dec 2013 18:49:53 GMT
On Sun, Dec 1, 2013 at 4:33 PM, Nir A <> wrote:

My POC web application has one html page with javascript web socket
> send\recieve messages.
> What i did notice that might shade light on whats the problem is the
> following scenario:
> If i press f5 on the browser, the web page is loaded and a new http
> handshake is taking place. when that happens all the attributes do
> replicate!!!
> Is there a way to make the attribute replicate without the need of
> refreshing the page?

In HTTP you have many requests associated with a session id. With session
replication, each new request could go to a different server and still
access the same HTTP session attributes.

In WebSocket on the other hand there is a single connection the server and
if you lose it, you have to reconnect, which is probably what pressing F5
does for you. Unless I'm missing something, you have to detect when the
WebSocket connection is closed on client side and reconnect.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message