Shutdown hook for a clean shutdown
There's a good chance that some non-daemon threads handled by some sort of
are preventing JVM from a clean shutdown.
How to use it exactly depends on the situation.
For example when dealing a simple Java "main" program, which has only a single context then
registering this hook by
should be sufficient.
In case of some sort of webapp in a servlet container where there are multiple levels of contexts
the recommended way to use it is to register a
NB! As the usage method of this hook is dependant on the system/situation and may vary,
so in consequence it's still in experimental status
Created by Janar Rahumeel (CGI Estonia)