Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

ServletContextListener's contextDestroyed is called while application is still running

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...
Ranch Hand
Posts: 312
MS IE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One possibility is that, the thread could have been killed.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic