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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to