This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If my daemon process does not have a remote hook, such as RMI/JMX, that can signal it to shut down gracefully, what is the next best way to do some clean up before the JVM terminates?
This process have several daemon threads that may still be working. If there's some clean up hook that can be registered to the JVM, is there a limit on how long can the clean up code runs before the OS kills the process?
The process is likely to be terminated by "ctrl-c" or linux "kill" command.