Basically () of my application, I have the following code for backing up data so that it does not get lost in the event of a system shutdown.
//add hook to trigger Production Shutdown sequence Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { public void run() { Production.shutdown(); } }));
However, if I click the Stop button in my IDE or rely on logging in (the code shown below), it never saves data in the database or writes any logs to the console.
ctx.deploy(server); server.start();
How does this shutdown function fail?
source share