logger.warn("Error while shutting down graphs. All graphs may not have been shutdown cleanly.");
}
}
private void startShutdownManager(final RexsterProperties properties) throws Exception {
final ShutdownManager shutdownManager = new ShutdownManager(properties);
//Register a shutdown hook
shutdownManager.registerShutdownListener(new ShutdownManager.ShutdownListener() {
public void shutdown() {
// shutdown grizzly/graphs
stop();
}
});
//Start the shutdown listener
shutdownManager.start();
//Wait for a shutdown request and all shutdown listeners to complete
shutdownManager.waitForShutdown();
}