Shutdown hook triggers doClose within startupShutdownMonitor

Issue: SPR-13556
This commit is contained in:
Juergen Hoeller
2015-10-09 22:54:44 +02:00
parent 8b3b8d070e
commit 92dc51f6a8

View File

@@ -891,7 +891,9 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
this.shutdownHook = new Thread() {
@Override
public void run() {
doClose();
synchronized (startupShutdownMonitor) {
doClose();
}
}
};
Runtime.getRuntime().addShutdownHook(this.shutdownHook);