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

destroy()

 
eswar kumar
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How the container knows whether there are still servlet requests or not for calling destroy()method?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13062
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the servlet container gets the original request, creates/assigns a Thread to handle it, interprets it as a HttpServletRequest object, and calls the service method of the target, of course it knows which requests are still pending. How could it not?
Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic