ring

2018-02-20T01:58:04.000140Z

@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.

petr.mensik 2018-02-20T09:41:15.000220Z

@weavejester a what about threads and thread pools? Shouldn't be killed gracefully during shutdown if possible?

petr.mensik 2018-02-20T09:43:02.000531Z

So JVM shutdown hook would be the only option?

mpenet 2018-02-20T10:03:19.000366Z

it's the advised option

mpenet 2018-02-20T10:04:03.000138Z

you can call whatever you like from there: a component system/stop or equivalent from another lib

mpenet 2018-02-20T10:05:09.000444Z

Threads ll be terminated when the jvm shuts down otherwise

petr.mensik 2018-02-20T12:48:02.000357Z

@mpenet ok, thanks 🙂