Link Details

You're old enough, you're smart enough, and gosh darnit, you matter! Login and vote now.
Link 88763 thumbnail
User 303983 avatar

By ranvijay1210
via geekexplains.blogspot.com
Published: Jun 21 2008 / 12:32

Read the article to get a good understanding of Shutdown Hooks and their working in Java. What are Shutdown Hooks? When do they execute? How reliable are they? Caution to be taken while writing them?....
  • 16
  • 0
  • 1807
  • 628

Comments

Add your comment
User 272422 avatar

htowninsomniac replied ago:

0 votes Vote down Vote up Reply

I only once had to deal with shutdown hooks, and that was on a tablet PC where a GUI shutdown hook didn't complete when System.exit() was called. But it's definitely good knowing about this mechanism. Thanks for the article.
Perhaps you could do a follow-up and explain what shutdown hooks Java already installs. Depending on the platform, there are some that get pre-registered.

User 303983 avatar

ranvijay1210 replied ago:

0 votes Vote down Vote up Reply

I've not written the article myself... I just found it an interesting one and hence posted it here anticipating that others may also find it interesting and useful. Anyway, I hope the author of the article eventually reads the comment to follow up with the article on pre-registered hooks. Or may be I can post a comment on that site itself to ask that.

User 305269 avatar

rohitsingh1294 replied ago:

0 votes Vote down Vote up Reply

I found an interesting update on this article - Common Questions on Shutdown Hooks in Java (http://geekexplains.blogspot.com/2008/06/common-questions-on-shutdown-hooks-in.html).

Though, I personally didn't find them so common :-) A nice follow-up of the original article I would say.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.