tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Schneider" <jochen.schnei...@decrc.abb.de>
Subject Tomcat 3.2-b7 not compliant to Servlet Specification 2.2 ?!
Date Thu, 16 Nov 2000 09:20:16 GMT
Hi,

I posted the attached error description a few weeks ago but didn't get any response. Yesterday
I tried tomcat 3.2-b7 and the error seems to be still in there. 

It seems that tomcat does not remove all previously added contexts if it is shutdown. This
is a major problem because if the context is not properly removed the destroy method of the
servlets is not called, which is guaranteed by the serlvet specification. Therefor 3.2 does
not comply with JSDK 2.2. 

I have put some log messages in the destroy method of my servlets, but this method is never
called if I shutdown tomcat using the shutdown.bat command script. 

This behaviour can be reproduced with the three web apps coming with tomcat: (example, admin,
test). If tomcat (3.2-b7)  is started from a command prompt ( tomcat.bat run)  the following
output is produced (Test environment : JDK 1.2.2, Win NT 4.0 SP5, Tomcat 3.2-b7):

[e:\temp\tomcat-3.2-b7\bin]tomcat.bat run
Including all jars in e:\temp\tomcat-3.2-b7\lib in your CLASSPATH.

Using CLASSPATH: e:\temp\tomcat-3.2-b7\classes;e:\temp\tomcat-3.2-b7\lib\ant.jar
;e:\temp\tomcat-3.2-b7\lib\jasper.jar;e:\temp\tomcat-3.2-b7\lib\jaxp.jar;e:\temp
\tomcat-3.2-b7\lib\parser.jar;e:\temp\tomcat-3.2-b7\lib\servlet.jar;e:\temp\tomc
at-3.2-b7\lib\webserver.jar

2000-11-15 05:09:23 - ContextManager: Adding context Ctx( /examples )
2000-11-15 05:09:23 - ContextManager: Adding context Ctx( /admin )
Starting tomcat. Check logs/tomcat.log for error messages
2000-11-15 05:09:23 - ContextManager: Adding context Ctx(  )
2000-11-15 05:09:23 - ContextManager: Adding context Ctx( /test )
2000-11-15 05:09:23 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
2000-11-15 05:09:23 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007


All contexts were added properly!

If I shutdown tomcat using the stop script (shutdown.bat) from another command prompt the
following output is produced : 


2000-11-15 05:09:27 - ContextManager: Removing context Ctx( /examples )
2000-11-15 05:09:27 - ContextManager: Removing context Ctx(  )


As you can see only the /example and the root context was removed. The real strange thing
is that the output varies! Here is the output of a second try with exact the same environment!

[e:\temp\tomcat-3.2-b7\bin]tomcat.bat run
Including all jars in e:\temp\tomcat-3.2-b7\lib in your CLASSPATH.

Using CLASSPATH: e:\temp\tomcat-3.2-b7\classes;e:\temp\tomcat-3.2-b7\lib\ant.jar
;e:\temp\tomcat-3.2-b7\lib\jasper.jar;e:\temp\tomcat-3.2-b7\lib\jaxp.jar;e:\temp
\tomcat-3.2-b7\lib\parser.jar;e:\temp\tomcat-3.2-b7\lib\servlet.jar;e:\temp\tomc
at-3.2-b7\lib\webserver.jar

2000-11-15 05:09:34 - ContextManager: Adding context Ctx( /examples )
2000-11-15 05:09:34 - ContextManager: Adding context Ctx( /admin )
Starting tomcat. Check logs/tomcat.log for error messages
2000-11-15 05:09:34 - ContextManager: Adding context Ctx(  )
2000-11-15 05:09:34 - ContextManager: Adding context Ctx( /test )
2000-11-15 05:09:35 - PoolTcpConnector: Starting HttpConnectionHandler on 8080
2000-11-15 05:09:35 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007

2000-11-15 05:09:37 - ContextManager: Removing context Ctx( /examples )



Now only the example context was removed by the ContextManager.


This behavior is a major problem for us since we rely on the destroy method of the servlet
to release some handles in a remote object. I tried a lot of things but didn't succeed. 


I really would appreciate any help or comment.

--Jochen 



Mime
View raw message