tag:blogger.com,1999:blog-6833381047348607392.post6373502944536850033..comments2024-03-18T17:47:40.063+09:00Comments on Leo's sandbox: Order of Shutdown Hook executionsLeo Lewishttp://www.blogger.com/profile/03054034337534040441noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-6833381047348607392.post-7135747136190707232016-11-28T18:34:20.028+09:002016-11-28T18:34:20.028+09:00Hi Leo, nice article. Thanks for sharing your expe...Hi Leo, nice article. Thanks for sharing your experiences.<br />Although I find your code a bit not optimal, two concerns:<br />1. Major: you are invoking all hooks sequentially instead of concurrently.<br />2. Minor: you access the static field without any synchronization.<br /><br />BTW: personally I prefer just to invoke the `java.lang.ApplicationShutdownHooks.runHooks()` method via a reflection, but yours solution is interesting.Greghttps://www.blogger.com/profile/09436824629173990354noreply@blogger.com