Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call destroy() method ?

 
sam liya
Ranch Hand
Posts: 1240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how the container identify which servlet instance to call destroy() method ?
 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container doesn't select any particular servlet to call the destroy() method on. It will call the destroy() method on all live instances of servlets that are present.
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally, when the servlet is about to be removed from memory, the container calls its destroy() method.
and that is servlet one last chance to clean up resources.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic