Is it possible to figure out, for instance in catch block or anywhere in the code, at any time, if the system has begun a shut down?
Normally the shutdownhooks are fired, but Java runtime cannot guarantee when those will run, so I can't register one to set a flag to read elsewhere.
Is it possible to call some method to figure out if the system has gone into that state? For instnace if someone called System.exit(x) or Runtime.getRuntime().exit(status);