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

destroy method of servlet

 
sai prasanna
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

how many ways we can destroy the servlet. In the realtime did we call destroy method explicitly?

thanks in advance
saiprasanna
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't ever call the servlet lifecycle methods - constructors, init, destroy- yourself; the servlet container does it for you.
[ May 09, 2006: Message edited by: Ulf Dittmer ]
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In the realtime did we call destroy method explicitly?


The method will be executed like any other normal method if you call the method explicitly, but it will NOT make the servlet instance eligible for garbage collection.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic