Fork me on GitHub
#ring
<
2018-02-20
>
weavejester01:02:04

@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.mensik09:02:15

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

petr.mensik09:02:02

So JVM shutdown hook would be the only option?

mpenet10:02:19

it's the advised option

mpenet10:02:03

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

mpenet10:02:09

Threads ll be terminated when the jvm shuts down otherwise