I may have found this was fixed in 5.5.17 since I see this line in the
changelog:
Correctly reset listeners when reloading a webapp (remm)
I'll give that a try....
David
David Wall wrote:
We have multiple webapps running in a single Tomcat instance, and when
we need to upgrade a given webapp, we install a "system down" web.xml
that defines a "null operation" listener (we normally have one that
bootstraps the application, connects to databases, etc.) and maps
everything to a servlet that displays an error message.
What we found is that if we stop/start or reload the webapp using the
Tomcat Manager application, the original context listener class is
still being invoked, which of course we don't want since it
initializes the application and such. We do find that the all
requests to any URL will use the system down servlet, so the system is
restarting using the system down version of web.xml.
If we restart Tomcat entirely, then it works as expected, giving us
the system down errors, but not running the real context listener.
Is there a way to allow this to work using the Manager app? This
would be preferable as we'd like to be able to do maintenance on a
given webapp without affecting all of the others.
We're using Tomcat 5.5.12 with JDK 1.5 on Red Hat Linux.
Thanks,
David
P.S. Here's that web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>System down</display-name>
<description>System down</description>
<listener>
<listener-class>com.test.servlet.SystemDownContextListener</listener-class>
</listener>
<servlet>
<servlet-name>SystemDown</servlet-name>
<servlet-class>com.test.servlet.SystemDown</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SystemDown</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>1</session-timeout>
</session-config>
</web-app>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]