Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 797 invoked from network); 2 Dec 2004 17:02:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Dec 2004 17:02:23 -0000 Received: (qmail 70045 invoked by uid 500); 2 Dec 2004 17:01:39 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 70021 invoked by uid 500); 2 Dec 2004 17:01:39 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 70006 invoked by uid 99); 2 Dec 2004 17:01:39 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mail.meritwebhosting.com (HELO mail.meritwebhosting.com) (69.28.197.227) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Dec 2004 09:01:39 -0800 Received: from [192.168.1.112] ([66.207.96.122]) by mail.meritwebhosting.com with MailEnable ESMTP; Thu, 02 Dec 2004 12:00:39 -0500 Message-ID: <41AF4A88.6080205@orbiscommunications.com> Date: Thu, 02 Dec 2004 12:02:00 -0500 From: Morley Howell User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: tomcat-user@jakarta.apache.org Subject: ServletContextListener lifecycle bug? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi all, We have a web app running under Tomcat 5.0.28. We wrote a ServletContextListener and configured it in the web.xml, and all works fine. Then one day we wanted to disable the listener, so we commented it out in our web.xml. Tomcat then reloaded the app. Our listener got a contextDestroyed call, as expected, but then it still received a contextInitialized when the app was re-started (we know this because of some logging we do in the listener). So then we stopped and started the webapp, with the same result. The only way we could get the listener to go away was to re-start Tomcat itself. To me this behaviour appears to violate the intent of the ServletContextListener interface as well as the contract defined by the web.xml deployment descriptor. On the practical side, having to restart Tomcat to disable a listener is not a viable solution in a production environment. Has anyone else experienced this behaviour? Is this behaviour intentional for some reason, or is this a bug? Thanks, Morley Howell --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org