Tag

shutdown-hook

0 views collected around this technical thread.

Selected Java Interview Questions
Selected Java Interview Questions
Dec 3, 2023 · Backend Development

Understanding JVM Exit Mechanisms and Graceful Shutdown in Spring Boot Applications

This article explains the three JVM termination modes, how to use shutdown hooks and Spring's lifecycle events to implement graceful shutdown of HTTP, RPC and MQ entry points, manage thread‑pool termination, and avoid resource‑leak or inconsistent state during service redeployment.

Graceful ShutdownJVMSpring Boot
0 likes · 18 min read
Understanding JVM Exit Mechanisms and Graceful Shutdown in Spring Boot Applications
Architecture Digest
Architecture Digest
Jul 19, 2023 · Backend Development

Graceful Shutdown of Spring Boot Applications Using Linux Signals and Actuator

The article explains how to achieve graceful shutdown of Spring Boot services by handling Linux signals, registering JVM shutdown hooks, using Spring's ContextClosedEvent and Actuator endpoint, and provides practical code examples for safely terminating thread pools, sockets, and other resources.

ActuatorGraceful ShutdownJVM
0 likes · 11 min read
Graceful Shutdown of Spring Boot Applications Using Linux Signals and Actuator
政采云技术
政采云技术
Feb 16, 2023 · Backend Development

Graceful Shutdown Support in Spring Boot 2.3+ for Embedded Web Servers

Spring Boot 2.3.0.RELEASE adds graceful shutdown for all embedded web servers, explaining the underlying SmartLifecycle mechanism, configuration steps, shutdown hook registration, and how timeout handling ensures existing requests finish while new requests are rejected.

Embedded Web ServerGraceful ShutdownJava
0 likes · 11 min read
Graceful Shutdown Support in Spring Boot 2.3+ for Embedded Web Servers
Architect's Tech Stack
Architect's Tech Stack
Nov 23, 2020 · Backend Development

Graceful Shutdown in Java: Using Shutdown Hooks and ThreadPool Management

This article explains the concept of graceful shutdown for Java services, demonstrates how to register shutdown hooks with Runtime.getRuntime().addShutdownHook, provides a complete code example using thread pools, shows the execution results, and discusses best practices for safely terminating applications.

Graceful ShutdownJavaOperations
0 likes · 8 min read
Graceful Shutdown in Java: Using Shutdown Hooks and ThreadPool Management
Java Architecture Diary
Java Architecture Diary
May 18, 2020 · Operations

How to Implement Graceful Shutdown in Spring Boot 2.3 and Avoid Data Loss

Learn how Spring Boot 2.3’s built-in graceful shutdown works, configure it with server.shutdown=graceful, understand shutdown phases, timeout settings, and see code examples for handling shutdown hooks and actuator endpoints, ensuring active requests finish without data inconsistency across Tomcat, Jetty, Netty, and Undertow.

ActuatorGraceful ShutdownJava
0 likes · 5 min read
How to Implement Graceful Shutdown in Spring Boot 2.3 and Avoid Data Loss