Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ServletContextListener's contextDestroyed is called while application is still running

 
subodh gupta
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I have faced a problem and just wondering how could that happened? So i am having a thread which is running continuously till my application runs...

And stop running via flag which is set in ServletContextListener's contextDestroyed method.

Now my application was up for couple of months with server running continuously without shutdown... But recently i discovered that this thread has been stopped... there is no exception because log should have had it. Which lead to belief that contextDestroy method has been called somehow.

Also one baffling thing is in contextInit i again create the thread.... its hard to understand this behavior has any faced this problem before?

FYI... i am using tomcat...
 
Madhan Sundararajan Devaki
Ranch Hand
Posts: 312
Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One possibility is that, the thread could have been killed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic