Atmosphere/atmosphere-extensions — pull request #151 by Selectorrr (2014-05-30 14:41:33+00:00)
Title: Fix #150

This is a dirty hack. I think a best implementation for ShutdownHook look like this:

try {
registry.unbind(url);
if (service instanceof UnicastRemoteObject) {
UnicastRemoteObject.unexportObject(service, true);
}
} catch (RemoteException e) {
logger.error("Unable to unexport RMI service", e);
} catch (NotBoundException e) {
logger.error("Unable to unbind RMI url", e);
}

But this is not work and i don't know why.
Look http://stackoverflow.com/questions/7386227/jvm-wont-terminate