Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6080C10F1A for ; Mon, 2 Dec 2013 18:50:24 +0000 (UTC) Received: (qmail 76922 invoked by uid 500); 2 Dec 2013 18:50:20 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 76875 invoked by uid 500); 2 Dec 2013 18:50:20 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 76866 invoked by uid 99); 2 Dec 2013 18:50:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2013 18:50:20 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rstoyanchev@gopivotal.com designates 209.85.214.170 as permitted sender) Received: from [209.85.214.170] (HELO mail-ob0-f170.google.com) (209.85.214.170) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Dec 2013 18:50:14 +0000 Received: by mail-ob0-f170.google.com with SMTP id wp18so13372407obc.29 for ; Mon, 02 Dec 2013 10:49:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=F+Sz8p//jCcq0M0ZEa5Hx10Maw8T04d8cqdya4w5rXo=; b=bDyWZpLtmjV3dEuuu5aYjhptdiR/3uHGWzybwrf5fe+StOXuczay8XN1OOkENuWHMz e63ZC3tkEJ30VpIusuN0GKSh2q51kgtLAy1GNbaGwXUnBIHvccGlJvRXikZZnt+P1OkX qYmExo3KOJTQLyuM/O4PAl1xP49/n7MMIfzSYwKifK3NmpWNvoqhNUj4eEs5rUbzrDDU ErmIOR2ZbmR85HA5ASzuqY1PzhwVGf8xOPf3PLoictaMielnB0VCaT/VBvvBhzE9ojjv UzCJkUJnWD2Op6fJMg4SOmchG2TNt6XTGpe3Lh/ixVM38sEOMCCE2eRxpZTGH/2HxQca brYw== X-Gm-Message-State: ALoCoQmeDZ3YZ1Blg/iUu5L/eBnfu68iITLEOEYKRSqemaUjSbafRKizeuLhE/Anzpamr46RJZEw MIME-Version: 1.0 X-Received: by 10.60.59.68 with SMTP id x4mr9455498oeq.31.1386010193394; Mon, 02 Dec 2013 10:49:53 -0800 (PST) Received: by 10.182.104.135 with HTTP; Mon, 2 Dec 2013 10:49:53 -0800 (PST) In-Reply-To: References: Date: Mon, 2 Dec 2013 20:49:53 +0200 Message-ID: Subject: Re: Websockets with tomcat clustering and session replication From: Rossen Stoyanchev To: Tomcat Users List Content-Type: multipart/alternative; boundary=089e013cb7e83bf32904ec91a5c0 X-Virus-Checked: Checked by ClamAV on apache.org --089e013cb7e83bf32904ec91a5c0 Content-Type: text/plain; charset=ISO-8859-1 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. Rossen --089e013cb7e83bf32904ec91a5c0--