Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

destroy() method  RSS feed

 
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: 297
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
Boost this thread!