Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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: 13071
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic