Join Slack
Powered by
is there a function which can be called on shutdow...
# server
h
Hamza
06/11/2018, 8:53 AM
is there a function which can be called on shutdown? To represent when the app is closing?
h
hho
06/11/2018, 9:00 AM
Standard on the JVM:
https://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#addShutdownHook-java.lang.Thread-
h
Hamza
06/11/2018, 9:00 AM
oh, im so dumb! I should’ve thought of that! Thanks.
d
dave
06/11/2018, 9:14 AM
TBH - if you're dependent on some behaviour in an app shutdown then it should be abstracted from the JVM shutdown itself. After all, how can you test otherwise?
dave
06/11/2018, 9:14 AM
🙂
h
Hamza
06/11/2018, 9:14 AM
You’re definitely correct.
6
Views
Open in Slack
Previous
Next