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 B608910664 for ; Sun, 1 Dec 2013 14:34:03 +0000 (UTC) Received: (qmail 98121 invoked by uid 500); 1 Dec 2013 14:33:58 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 98011 invoked by uid 500); 1 Dec 2013 14:33:56 -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 98002 invoked by uid 99); 1 Dec 2013 14:33:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Dec 2013 14:33:55 +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 (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.223.177] (HELO mail-ie0-f177.google.com) (209.85.223.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Dec 2013 14:33:50 +0000 Received: by mail-ie0-f177.google.com with SMTP id tp5so18501387ieb.22 for ; Sun, 01 Dec 2013 06:33:29 -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:date:message-id:subject:from:to :content-type; bh=D1IgAGGUrKDenInSYtvqLvAgZQ36r3jEesKqZ+iwQZ8=; b=e74RBaufuZ5XJKSQvdvVKmsuOcrpo/4qZmjHL67EUNUjKqWqf/bbko2GO2NjO4k6Vo q+Q2PbejQWDT29XzNcrtfbGz0/E5Tf0KS28ZqsWU+4O61yeWAW0ey8KgktAGQNKBBwzW HTO54H6FovHfm22h2agRdYOKhRYo9KC8bcCQwz4+yHQ9Hs8LM1tja9/omaODFfZLXPN6 w5gTHxJiM4/T415SrOhw65PLpSI0TwS1t+igZXbXFewDiZ31j4HhB+CX7IUciT10gOwh Md8zgHusNWEniFserxZb89/IS5PLisgq3nO3oRhnwYxNyfbxSTi+OiNYbHdf1X4v0iT4 mDrA== X-Gm-Message-State: ALoCoQnBVyBMGTHxlxJlcU7uoCaesUYAucr2BI1Ey7DsugL98npYUN3CuGkrOAc8Z1DdiI0wA4hE MIME-Version: 1.0 X-Received: by 10.50.253.229 with SMTP id ad5mr13847520igd.42.1385908409061; Sun, 01 Dec 2013 06:33:29 -0800 (PST) Received: by 10.64.170.36 with HTTP; Sun, 1 Dec 2013 06:33:28 -0800 (PST) Date: Sun, 1 Dec 2013 16:33:28 +0200 Message-ID: Subject: Websockets with tomcat clustering and session replication From: Nir A To: users@tomcat.apache.org Content-Type: multipart/alternative; boundary=001a1135f6a869f0a504ec79f219 X-Virus-Checked: Checked by ClamAV on apache.org --001a1135f6a869f0a504ec79f219 Content-Type: text/plain; charset=ISO-8859-1 Hi, Ive asked here before about how do i get a session replication over websockets sessions. Mark Thomas answered me that i should try and link the httpsession with the websocket and then i will gain the replication abilities. So, I listended and implemented it just like in this url: http://stackoverflow.com/questions/17936440/accessing-httpsession-from-httpservletrequest-in-a-web-socket-socketendpoint So now, I'm able to get the session for each client. and I Do get replication! pretty nice! Only problem is, While i'm adding new attributes to the primary session (in tomcat#1 for example) , the replicated sessions (in tomcat#2 for example) does NOT contain any attribues. The session backup is there but no attributes at all. 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? Thanks! --001a1135f6a869f0a504ec79f219--