|
|
@ -944,8 +944,13 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader |
|
|
|
// If we registered a JVM shutdown hook, we don't need it anymore now:
|
|
|
|
// If we registered a JVM shutdown hook, we don't need it anymore now:
|
|
|
|
// We've already explicitly closed the context.
|
|
|
|
// We've already explicitly closed the context.
|
|
|
|
if (this.shutdownHook != null) { |
|
|
|
if (this.shutdownHook != null) { |
|
|
|
|
|
|
|
try { |
|
|
|
Runtime.getRuntime().removeShutdownHook(this.shutdownHook); |
|
|
|
Runtime.getRuntime().removeShutdownHook(this.shutdownHook); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
catch (IllegalStateException ex) { |
|
|
|
|
|
|
|
// ignore - VM is already shutting down
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|