ConfigurationManager configurationManager = kernel.getConfigurationManager();
configurationManager.load(configuration, classLoader.getResource("/"), classLoader);
Runtime.getRuntime().addShutdownHook(new Thread("Shutdown Thread") {
public void run() {
log.info("Server shutdown begun");
kernel.shutdown();
log.info("Server shutdown completed");
}
});
// start this configuration