What's the correct way to ensure that HK2 PreDestroy() semantics are
properly observed in singletons bound using Jersey 2 at shutdown? Some
have suggested injecting the ServiceLocator into the application, then
invoking shutdown on it during PreDestroy().
[1]
http://stackoverflow.com/questions/19735711/jersey-2-3-not-invoking-hk2
-service-locator-shutdown-when-servlet-container-is-s