aspose file tools*
The moose likes Java in General and the fly likes addShutdownHook and killing a asynchronous process Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "addShutdownHook and killing a asynchronous process" Watch "addShutdownHook and killing a asynchronous process" New topic
Author

addShutdownHook and killing a asynchronous process

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Hi All,

I wanted to know your thoughts on this. Currently I have a asynchronous web service implementation which internally is long running process.
The users are now requesting a feature if there is a way they can kill this process.

I did go through the docs and found something called addShutDownHook. I was wondering if anyone has used this feature in the past and can provide some info.
As part of the asynchronous run we do provide a id while accepting the request.

Regards,
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39436
    
  28
Shutdown hooks are easy to use. Google. and you find lots, eg this, and these questions. Yes. I know the Oracle link is marked 1.4.2, but it still works.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: addShutdownHook and killing a asynchronous process