tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23373] - Servlet destroy() methods not being called at shutdown
Date Wed, 24 Sep 2003 19:51:21 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23373>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23373

Servlet destroy() methods not being called at shutdown





------- Additional Comments From Dave@JungleMoss.com  2003-09-24 19:51 -------
Remy,
I won't reopen it because you said not to, but I've debugged this. How can I 
prove it to you? Look at procrun_destroy_jvm in procrun.c. It calls jni_attach 
which:
    err = (*jvm)->AttachCurrentThread(jvm,
                                      (void **)&env,
                                      NULL);
Stepping over line 423 in Catalina.java results in a callback to setServer and 
the Server object that stop gets called on is the same object.
Just the fact that I can hit a break point at main in Bootstrap.java when I 
try to stop the service proves it. Because I'm attached to the JVM that the 
service started.

I created the service with:
C:\Tomcat\Home\bin\tomcatw.exe //IS//TomcatDebugServer --DisplayName "Apache 
Tomcat Debug Server" --Description "Apache Tomcat 5.0.12 Server - 
http://jakarta.apache.org/tomcat/ - Debug Server"  --
Install "C:\Tomcat\Home\bin\tomcat.exe" --
ImagePath "C:\Tomcat\Home\bin\bootstrap.jar" --StartupClass 
org.apache.catalina.startup.Bootstrap;main;start --ShutdownClass 
org.apache.catalina.startup.Bootstrap;main;stop --Java 
C:\Tomcat\J2SDK\jre\bin\server\jvm.dll --JavaOptions -server#-Xdebug#-
Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=53006#-Xms512m#-
Xmx512m#-Xrs#-Dsp.log.suffix="_server1"#-
Djava.endorsed.dirs="C:\Tomcat\Home\bin;C:\Tomcat\Home\common\endorsed"#-
Dcatalina.base="C:\Tomcat\BaseServer1"#-Dcatalina.home="C:\Tomcat\Home"#-
Djava.io.tmpdir="C:\Tomcat\BaseServer1\temp" --Startup manual --StdOutputFile 
C:\Tomcat\BaseServer1\logs\stdout.log --StdErrorFile C:\Tomcat\BaseServer1
\logs\stderr.log --Arguments "-config C:\Tomcat\BaseServer1\conf\server.xml"

My problem is not that the JVM stops too early, it's that our webapp has some 
daemon threads that are running. They don't get interupted because destroy 
never gets called, therefore the service never stops.

Mime
View raw message