try {
Thread.sleep(delayMs);
LOGGER.warn("Delayed shutdown forced the application to exit with code {}.", exitCode);
- System.exit(exitCode);
+ // Method halt is used instead of System.exit, because running
+ // of shutdown hooks hangs the application in some cases.
+ Runtime.getRuntime().halt(exitCode);
} catch (InterruptedException e) {
e.printStackTrace();
}
SimanticsArguments.EXPERIMENT,
SimanticsArguments.DISABLE_INDEX,
SimanticsArguments.DATABASE_ID,
+ SimanticsArguments.DO_NOT_SYNCHRONIZE_ONTOLOGIES
};
IArguments result = Arguments.parse(args, accepted);
return result;