Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 36839 invoked from network); 10 Nov 2005 16:23:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Nov 2005 16:23:56 -0000 Received: (qmail 4289 invoked by uid 500); 10 Nov 2005 16:23:32 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 4202 invoked by uid 500); 10 Nov 2005 16:23:32 -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 4079 invoked by uid 500); 10 Nov 2005 16:23:31 -0000 Delivered-To: apmail-jakarta-tomcat-user@jakarta.apache.org Received: (qmail 4050 invoked by uid 99); 10 Nov 2005 16:23:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2005 08:23:31 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [141.254.1.213] (HELO saam1.sysadm.suny.edu) (141.254.1.213) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2005 08:23:22 -0800 Received: from scenm1.sysadmin.suny.edu ([141.254.1.215]) by sysadm.suny.edu (PMDF V6.2 #30588) with ESMTP id <01LV8CF7LW1O0036PU@sysadm.suny.edu> for tomcat-user@jakarta.apache.org; Thu, 10 Nov 2005 11:24:01 -0500 (EST) Date: Thu, 10 Nov 2005 11:23:03 -0500 From: "Durfee, Bernard" Subject: session.invalidate() change To: Tomcat Users List Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: quoted-printable Thread-Topic: session.invalidate() change Thread-Index: AcXmEwitW/Ak31CqSRCo0nkdiOgkNA== content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N It seems that Tomcat is handling session.invalidate() differently now. I have HttpSessionListeners attached to the session, which need the sessionId to perform some cleanup when they are unbound from the session. This was no problem, up until Tomcat 5.5 or so. Now I get this exception... java.lang.IllegalStateException: getId: Session already invalidated at org.apache.catalina.session.StandardSession.getId(StandardSession.java:3 28) at org.apache.catalina.session.StandardSessionFacade.getId(StandardSessionF acade.java:78) at org.jasig.portal.jndi.JNDIManager$JNDISessionListener.valueUnbound(JNDIM anager.java:331) at org.apache.catalina.session.StandardSession.removeAttributeInternal(Stan dardSession.java:1607) at org.apache.catalina.session.StandardSession.expire(StandardSession.java: 737) at org.apache.catalina.session.StandardSession.expire(StandardSession.java: 643) at org.apache.catalina.session.StandardSession.invalidate(StandardSession.j ava:1088) at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSes sionFacade.java:149) ...which is caused by the valueUnbound() handler calling event.getSession().getId(). This worked before. Was this an unintended change in Tomcat funcationality or is there a change in the spec that caused this behavior to change? It seems like the session should still give up at least it's ID to valueUnbound() handlers or maybe the sessionId should be added to the event itself. Bernie --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org