Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 63852 invoked from network); 8 Oct 2005 19:05:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Oct 2005 19:05:17 -0000 Received: (qmail 55102 invoked by uid 500); 8 Oct 2005 19:05:05 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 54187 invoked by uid 500); 8 Oct 2005 19:05:02 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 54176 invoked by uid 99); 8 Oct 2005 19:05:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Oct 2005 12:05:02 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=FORGED_RCVD_HELO,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [216.55.191.200] (HELO webmail1.abac.com) (216.55.191.200) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Oct 2005 12:05:05 -0700 Received: from webmail.xsoftware.biz (localhost.abac.com [127.0.0.1]) by webmail1.abac.com (8.13.5/8.13.5) with ESMTP id j98J4eVi047779 for ; Sat, 8 Oct 2005 12:04:41 -0700 (PDT) (envelope-from dean@xsoftware.biz) Received: from coproxy1.avaya.com ([198.152.13.67]) (SquirrelMail authenticated user dean@xsoftware.biz); by webmail.xsoftware.biz with HTTP; Sat, 8 Oct 2005 12:04:41 -0700 (PDT) Message-ID: <48887.198.152.13.67.1128798281.squirrel@198.152.13.67> Date: Sat, 8 Oct 2005 12:04:41 -0700 (PDT) Subject: SessionListener invoked sometimes and not others From: dean@xsoftware.biz To: tomcat-user@jakarta.apache.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam-Score: 0.65 (NO_REAL_NAME) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N So after a restart of tomcat, I login and it appears the session is still valid, so it does not go through my session listener. I need to be aware of the web application lifecycle and want to grab a resource when the webapp starts and release when the web app goes away. How do I do that? I was doing this in the SessionListener upon creation of the first session and releasing when the last session went away. But since tomcat may be saving session, I am getting a request and getting a nullpointerexception now since the resource had not been allocated in web app startup. How does one deal with this kind of problem? thanks, dean --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org