Forums Register Login

Servlet Instance

+Pie Number of slices to send: Send
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??
+Pie Number of slices to send: Send
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 !
+Pie Number of slices to send: Send
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).
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 448 times.
Similar Threads
Servlet Destroy() Method
Question No: 10 (Question ID: 711) from jdiscuss
when is destroy called
when destory() gets called ??
When a servlet is removed by the container?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:40:21.