Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Instance

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The statement below is from Mikalai Zaikin's notes,

"The servlet container is not required to keep a servlet loaded for any particular period of time. A servlet
instance may be kept active in a servlet container for a period of milliseconds, for the lifetime of the servlet
container (which could be a number of days, months, or years), or any amount of time in between."

What it actually means?? Can anyone give a clear picture of it??
 
Niranjan Deshpande
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey...hang on...all this means..that its upto the container to garbage collect a servlet instance...! and you never know how any vendor specific container does it !
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means that the servlet may get loaded and initialized any number of times, not just once when the web app starts up. So, whatever you do in the init method, don't assume that it will be called only a single time during the life of a web app (although, in practice, that's usually what happens).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic