File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Undeploying web application does not stop the running process Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply locked New topic
Author

Undeploying web application does not stop the running process

Veera Sundar
Greenhorn

Joined: Jun 08, 2007
Posts: 25
Hello All,

Can anyone help me on this issue.

"I am running a web application, which will constantly monitor a ftp folder and whenever a new file comes on that folder, the application will download it. I have scheduled a thread to run every 15 mins to do this task. The problem, when I undeploy my web application from Tomcat, the scheduled process is not closing. It is still running."


I posted above in the Thread forum and got the following reply,

"If you are just spawning a new thread from inside your web application, Tomcat will not be able to interrupt it when the web app is undeployed.
May be you can ask the question in Tomcat forum, they will be able to tell whether you can attach a hook to get a callback on webapp undeployment."

Any clue on how to destroy this scheduled process while undeploying the web application?


Thanks,<br />Veera |<a href="http://veerasundar.com/blog" target="_blank" rel="nofollow">Blog</a>
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Veera Sundar,

We have a forum on Threads and Synchronization.
I'm going to move this topic over there for you since it's more about handling /interrupting threads than about Tomcat in particular.

-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Actually, I've got to get someone else to do it for me since I no longer tend this forum.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41188
    
  45
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread in the Threads and Synchronization forum, where you have answers already.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Undeploying web application does not stop the running process
 
Similar Threads
Tomcat undeployment
Undeploy problem
Generate pdf file and display in a browser
Scheduled Thread running after 8 hours, Performance Impcat
Undeploying web application does not stop the running process