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

Question on destroy method

 
Swathi Sri
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Hi Christophe,

Thank you for the clarification.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic