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 B12537B4E for ; Thu, 20 Oct 2011 15:23:24 +0000 (UTC) Received: (qmail 49518 invoked by uid 500); 20 Oct 2011 15:23:21 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 49326 invoked by uid 500); 20 Oct 2011 15:23:21 -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 49315 invoked by uid 99); 20 Oct 2011 15:23:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2011 15:23:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2011 15:23:13 +0000 Received: from [192.168.245.129] (p549E9768.dip0.t-ipconnect.de [84.158.151.104]) by tor.combios.es (Postfix) with ESMTPA id 602F2DA01DA for ; Thu, 20 Oct 2011 17:22:51 +0200 (CEST) Message-ID: <4EA03CA9.9010105@ice-sa.com> Date: Thu, 20 Oct 2011 17:22:17 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: [OT?] control of session timed out with tomcat References: <4EA035CA.70309@ice-sa.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hassan Schroeder wrote: > On Thu, Oct 20, 2011 at 7:52 AM, Andr� Warnier wrote: > >> 1) Tomcat (probably) doesn't spend its time all the time scanning stored >> sessions to see if one has expired, and deleting it. > > Actually, it does. That's what session listeners depend on. > > So, for example, I can have a ShoppingCart with a method like > > public void valueUnbound(HttpSessionBindingEvent httpsessionbindingevent) > { > empty(); /* remove reserved status from items */ > } > > If the session times out without the cart contents being purchased, > the cart returns any items it contains to inventory. Very handy :-) > You mean that if there are 500 sessions active, Tomcat spends its time checking all of them repeatedly on the off-chance that one has expired ? Or is there a smarter algorithm implemented there ? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org