Results 1 to 4 of 4

Thread: when servlet get destroyed ?

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Answers
    5

    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.


  2. #2
    Junior Member
    Join Date
    Sep 2007
    Answers
    8

    Smile 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().


  3. #3
    Junior Member
    Join Date
    Feb 2007
    Answers
    5

    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.


  4. #4
    Banned
    Join Date
    Oct 2007
    Answers
    5

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact