@petr.mensik You can add a shutdown hook to the Java process, but in general it’s good practice to code your application so that it doesn’t expect to be shut down cleanly. At some point your application is going to be SIGKILLed, so if you design your application to not require a cleanup, then SIGKILL is no different from SIGTERM.
@weavejester a what about threads and thread pools? Shouldn't be killed gracefully during shutdown if possible?
So JVM shutdown hook would be the only option?
it's the advised option
you can call whatever you like from there: a component system/stop or equivalent from another lib
Threads ll be terminated when the jvm shuts down otherwise
fyi: https://github.com/mpenet/commons/blob/master/src/clj/qbits/commons/jvm.clj#L3
@mpenet ok, thanks 🙂