We recently updated our Java runtime environment from an old Oracle Java 6 version (1.6.0_18) to the most recent version, 1.6.0_45. Our application runs in the Java virtual machine without the -Xrs option. We are now seeing that our shutdown hook is not started if the Java runtime process is sent a SIGTERM or SIGINT signal. But the shutdown hook is started if SIGHUP is sent.
This behavior seems to contradict the documented behavior for the Oracle Java runtime on Linux, which says that the shutdown hook will be started if any of these three signals is sent to the JVM. Is this a known problem? Does anyone have ideas to check for other changes in our Linux environment that may be causing SIGTERM and SIGINT to be treated differently from SIGHUP in the JVM?
You might want to google for the way to do a custom signal handler and see if the signal is there. Not so much as to fix your problem but rather to see if you can see the signal at all.
Other than that Java 6 reached its end of life at the beginning of this year so that should probably be a consideration into your roadmap.