• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

destroy() method?

 
Vilas Lawande
Ranch Hand
Posts: 127
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,

Can destroy() method of servlet execute when server is crashed?

Thanks,
Vilas Lawande
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Destroy method executes when the server shuts down regularly.
If your system crashes or freezes it might well be that this method is never called.
 
Vilas Lawande
Ranch Hand
Posts: 127
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot
 
Keshav Prasad gurukul
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
since during server crash destroy is not called
we must be prepared for this scenario and must
not depend on it completely for performing cleanup
codes.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic