Session listener runs when brutally killing Tomcat process.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Adam_Zimowski
Posted On:   Monday, March 13, 2006 06:54 AM

Hi,

I have a standard session listener attached to my app. sessionDestroyed executes when session is indeed expired (destroyed). However, I tried simulating power outage by killing the JVM process with a kill command on my linux desktop, and I expected session listener not to run due to abrupt ending to the process. Yet it still executed. How can I prevent it from running in such situations?

Adam

Re: Session listener runs when brutally killing Tomcat process.

Posted By:   Adam_Zimowski  
Posted On:   Monday, March 13, 2006 07:25 AM

I quickly found the answer to my own question. It's how you kill a process in Linux/Unix that simulates the power outage. I simply used "kill " which allows the process to exit gracefully (thus cleaning stuff up and calling listeners) while if you do "kill -9 " the process will end abruptly as would be the case during hardware failure or a power outage.
About | Sitemap | Contact