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 A983F7A2C for ; Thu, 20 Oct 2011 15:17:00 +0000 (UTC) Received: (qmail 42272 invoked by uid 500); 20 Oct 2011 15:16:57 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 42227 invoked by uid 500); 20 Oct 2011 15:16:57 -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 42218 invoked by uid 99); 20 Oct 2011 15:16:57 -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:16:57 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hassan.schroeder@gmail.com designates 209.85.215.173 as permitted sender) Received: from [209.85.215.173] (HELO mail-ey0-f173.google.com) (209.85.215.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2011 15:16:51 +0000 Received: by eyh6 with SMTP id 6so4221379eyh.18 for ; Thu, 20 Oct 2011 08:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=YfQfwxUBeGYY3OXfRPM+5fW53xj9yssvI56o6evf5s8=; b=j+jHtpSa2s0f3a+QxmEs/qlzocwSoP1lznMRy2X3lmmQgVHolIJhs6eag0kvBmK9P+ Y20jcnQs7btoBVp773HjXTFjibe9Tgl7ZZqUccX1lhW4xpoVuCPs0V6HAQWGipVCIbgu ZbJh7FEsTIbOgXHwa4sf7kRu3SZoAeCc85sgI= MIME-Version: 1.0 Received: by 10.216.9.204 with SMTP id 54mr1879643wet.1.1319123790857; Thu, 20 Oct 2011 08:16:30 -0700 (PDT) Received: by 10.216.93.20 with HTTP; Thu, 20 Oct 2011 08:16:30 -0700 (PDT) In-Reply-To: <4EA035CA.70309@ice-sa.com> References: <4EA035CA.70309@ice-sa.com> Date: Thu, 20 Oct 2011 08:16:30 -0700 Message-ID: Subject: Re: control of session timed out with tomcat From: Hassan Schroeder To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Oct 20, 2011 at 7:52 AM, Andr=E9 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 :-) FWIW, --=20 Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org