Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

destroy() method

 
Harikrishna Gorrepati
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

1. Because destroy() is callback method which is called by Container when the server is about to shutdown, Do we need to override it (or) leave it to the container.
2. Even though I write couple of System.out.println() statements in destroy() method and shutdown the server, they are not printed on the console.

Please advice.
 
Javin Paul
Ranch Hand
Posts: 295
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Hari,

As per my knowledge destroy() method is called before a Servlet gets unloaded from Container. though its upto container implementation on which other cases its provides callback to destroy() method.

Thanks
Javin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic