Files
HW-09-Advanced-Multithreading/src/main/java/dev/banking/Main.java
T
Aryan 353873f10d refactor(banking-demo): introduce DemoApplication orchestrator and add controlled lifecycle management
- Replace DemoFactory with DemoApplication to centralize system setup, execution, and shutdown
- Move ExecutorService and ScheduledExecutorService lifecycle management into application layer
- Ensure proper shutdown sequence for worker and monitoring threads
- Simplify Main class to a minimal entry-point wrapper
- Improve clarity of execution flow: build → run → shutdown
- Prevent resource leakage by explicitly awaiting termination of thread pools
2026-06-05 20:31:08 +03:30

35 lines
877 B
Java

package dev.banking;
/**
* Entry point of the application.
*
* IMPORTANT:
* - Do NOT modify this file in student assignment.
* - This is only a wrapper for running the demo.
*/
public final class Main {
private Main() {
}
public static void main(String[] args) {
System.out.println("=================================");
System.out.println(" Advanced Banking System");
System.out.println("=================================\n");
try {
DemoApplication.run();
System.out.println("\n=================================");
System.out.println(" System finished successfully ");
System.out.println("=================================");
} catch (Exception e) {
System.err.println("Unexpected error occurred:");
e.printStackTrace();
}
}
}