File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

not freeing servlet on shutdown

 
Manoj John
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic