tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morley Howell <mor...@orbiscommunications.com>
Subject ServletContextListener lifecycle bug?
Date Thu, 02 Dec 2004 17:02:00 GMT
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


Mime
View raw message