-
Junior Member
when servlet get destroyed ?
Hai ,
I have faced a question in an interview. In an application like ebay there will be always lot of requests . When the servlet get destroyed in such sort of applications (taking any servlet which is providing service) ? I assume that the servlet never gets destroyed still the application is up . Kindly clarify.
-
Junior Member
Re: when servlet get destroyed ?
The server calls a servlet's destroy() method when the servlet is about to be unloaded. In the destroy() method, a servlet should free any resources it has acquired that will not be garbage collected. The destroy() method also gives a servlet a chance to write out its unsaved cached information or any persistent information that should be read during the next call to init().
-
Junior Member
Re: when servlet get destroyed ?
Thank you very much Raghunath.ek. It was informative .My doubt is when that destroy is called as the application is always runnning ? Meaning when the application is always up it needs the service of a servlet.So ,is it like when the application is down the servlet gets destroyed? I am not talking about the instance of it. I am talking about the Servlet itself.
-
Banned
Re: when servlet get destroyed ?
I think servlet will destroy only when server(application or web server) shutdown
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules