private static synchronized void restartApp() { if (!MscOpts.hasRapidoidWatch()) { Log.warn("Cannot reload/restart the application, module rapidoid-watch is missing!"); } if (mainClassName == null) { Log.warn("Cannot reload/restart the application, the main app class couldn't be detected!"); } Msc.logSection("!Restarting the web application..."); restarted = true; notifyListenersBeforeRestart(); resetAppStateBeforeRestart(); if (MscOpts.hasRapidoidJPA()) { loader = ReloadUtil.reloader(); ClasspathUtil.setDefaultClassLoader(loader); } reloadAndRunMainClass(); restarted = true; notifyListenersAfterRestart(); Log.info("!Successfully restarted the application!"); }
private static synchronized void restartApp() { if (!MscOpts.hasRapidoidWatch()) { Log.warn("Cannot reload/restart the application, module rapidoid-watch is missing!"); } if (mainClassName == null) { Log.warn("Cannot reload/restart the application, the main app class couldn't be detected!"); } Msc.logSection("!Restarting the web application..."); restarted = true; notifyListenersBeforeRestart(); resetAppStateBeforeRestart(); if (MscOpts.hasRapidoidJPA()) { loader = ReloadUtil.reloader(); ClasspathUtil.setDefaultClassLoader(loader); } reloadAndRunMainClass(); restarted = true; notifyListenersAfterRestart(); Log.info("!Successfully restarted the application!"); }