| Author |
not freeing servlet on shutdown
|
Manoj John
Ranch Hand
Joined: May 13, 2004
Posts: 36
|
|
Hi, I need urgent help for this please help... I am using tomcat-5.0.19. How i can meke sure that my servlet application is destroyed on shuttingdown the server.I am suspectng that it is not doing...bcz i am getting problem on restarting the server. I am loading the servlet on startup... I am thinking of using eventhandler to catch and freeing resources explicitly whenever the server is going to shutdown.please give some input on this how i can do this? am i in right path? if any other solution is there please give......
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12325
|
|
If the server is shutting down properly, the servlet destroy() method should be getting called. Thats a convenient place to ensure that resources are freed and put a System.out.println statement. You could also use a custom class implementing the ServletContextListener interface, but that appears to require more configuration. Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: not freeing servlet on shutdown
|
|
|