• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question on destroy method

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I got this question from jdiscuss.com. I thought that

Problem

Assuming that the Servlet Container has just called the destroy() method of a servlet instance, which of the following statements are correct?


Options

Select 2 correct options.

1.Any resources that this servlet might hold have been released.

2.The servlet container time out has exceeded for this servlet instance.

3.The init() method has been called on this instance.

4.None of the requests can EVER be serviced by this instance.

6.All threads created by this servlet are done.

I selected 1 and 4 but the answers given are 3 and 4.
I understand 3 is logically correct but I did not understand why 1 is wrong.

Can anybody please explain ?

Thanks ,
Swathi
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Any resources that this servlet might hold have been released.


No. You have to release them yourself. If you don't, then they will not be released.
 
Swathi Sri
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Christophe,

Thank you for the clarification.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic