@Override protected void run(Environment environment, Namespace namespace, T configuration) throws Exception { final Server server = configuration.getServerFactory().build(environment); try { server.addLifeCycleListener(new LifeCycleListener()); cleanupAsynchronously(); server.start(); } catch (Exception e) { LOGGER.error("Unable to start server, shutting down", e); try { server.stop(); } catch (Exception e1) { LOGGER.warn("Failure during stop server", e1); } try { cleanup(); } catch (Exception e2) { LOGGER.warn("Failure during cleanup", e2); } throw e; } }
@Override protected void run(Environment environment, Namespace namespace, T configuration) throws Exception { final Server server = configuration.getServerFactory().build(environment); try { server.addLifeCycleListener(new LifeCycleListener()); cleanupAsynchronously(); server.start(); } catch (Exception e) { LOGGER.error("Unable to start server, shutting down", e); try { server.stop(); } catch (Exception e1) { LOGGER.warn("Failure during stop server", e1); } try { cleanup(); } catch (Exception e2) { LOGGER.warn("Failure during cleanup", e2); } throw e; } }