-
1. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
sgjava Sep 12, 2002 1:00 PM (in response to jtorres)If it's session clean up why not use HttpSessionBindingListener? Then on invalidate you can clean up resources...
-
2. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
sgjava Sep 12, 2002 1:00 PM (in response to jtorres)If it's session clean up why not use HttpSessionBindingListener? Then on invalidate you can clean up resources...
-
3. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
jtorres Sep 12, 2002 1:38 PM (in response to jtorres)Thanks for the reply. Actually, the servlet in question is being used as a "startup servlet", with "load-at-startup" param set to 1. Some initialization, etc, is done within the init() of this servlet, and cleanup done when destroy() is called.
Any other suggestions would be appreciated. I remember my past experience with Weblogic: it allowed for startup classes which would be invoked during server startup. What the recommended approach in JBoss 3.x?
Regards! -
4. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
sgjava Sep 13, 2002 3:17 PM (in response to jtorres)Did you try this with JBoss 3.0.2 + Tomcat 4.0.4? Also, are you sure the Servlet is getting undeployed (in the log)?
-
5. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
jules Sep 15, 2002 7:37 AM (in response to jtorres)
It works for me.
Please send a testcase.
Jules@mortbay.com -
6. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
lordy Oct 10, 2002 8:28 AM (in response to jtorres)Sorry folks I should have posted to this thread in the first place. I'm getting it too...
JBoss 3.0.2 on Solaris 2.8.
The log says its being Undeployed and then stopped but the
destroy methods are not being called for my long running <load-on-startup> Servlets. :(
Lordy -
7. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
lordy Oct 10, 2002 9:21 AM (in response to jtorres)Here is a test case.
I've attached a WAR file. destroyTest.war
This has three files.
WEB-INF/web.xml (which loads the servlet)
WEB-INF/classes/DestroyTest.class (the servlet)
WEB-INF/classes/DestroyTest.java (the source - If you
want to re-compile yourself make sure the servlet classes are in the classpath )
When I deploy to JBoss 3.0.2 it logs up and writes to server.log whilst it is running. But its destroy method does not get called.
With Tomcat 3.3.1 on NT it works fine.
Relevent bit of log files:
TOMCAT server.log
=======
...
Context log path="/destroyTest" :DestroyTest: I'm alive
Context log path="/destroyTest" :DestroyTest: I'm alive
Context log path="/destroyTest" :DestroyTest: I'm alive
Context log path="/destroyTest" :default: destroy
Context log path="/destroyTest" :tomcat.errorPage: destroy
Context log path="/destroyTest" :DestroyTest: Goodbye :)
JBOSS server.log
======
(It looks messy so I haven't pasted it but the servlet never gets to say goodbye! and the war is reported as Undeployed.
Lordy -
8. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
lordy Oct 10, 2002 12:45 PM (in response to jtorres)Sorry to be a PITA but it all works OK in 3.0.3.
I could have saved myself a couple of hours today, but
I didn't realise 3.0.3 was released! Been too busy!!
Lordy -
9. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
rn00348 Oct 14, 2002 12:13 PM (in response to jtorres)Haven't seen a resolution to this problem posted. Here is a testcase.
mailto:rnell at sempratrading dotgoeshere commercial -
10. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
dietmars Oct 14, 2002 1:29 PM (in response to jtorres)Hi,
I experienced the same problem, but only if the servlet has no servlet-mapping associated. Maybe that's the problem.
Best regards,
Dietmar -
11. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
lordy Oct 14, 2002 7:26 PM (in response to jtorres)Fixed in 3.0.3 (for me anyway!!)
-
12. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
lordy Oct 14, 2002 7:27 PM (in response to jtorres)Posting Date Order looks screwed up (or am I missing something!!!)
-
13. Re: Servlet destroy() not being invoked in JBoss3.0.2 and Je
jules Oct 15, 2002 5:26 AM (in response to jtorres)distil it into a testcase and I will look at it.
Jules