This content has been marked as final.
Show 1 reply
-
1. Re: JBoss Shutdown hook
frankthetank Jun 20, 2008 3:51 AM (in response to extasy)You have your concepts mixed up.
A shutdown hook is a (or multiple) task you can add to the system that will then be executed when the system recieves a shutdown from the OS.
So, lets say you have a connection somewhere and you want it to be closed gracefully when the system shuts down. You would create a task that does exactly this and register it with the shutdown hook.
System.exit() tells the application to abort and (I'm only guessing now) would then call the shutdown hook.
Someone correct me if I am wrong.