@Override protected void doStop() throws Exception { commandExecutor.shutdownNow(); try { runnable.destroy(); } catch (Throwable t) { // Just catch the exception, not propagate it since it's already in shutdown sequence and // we want all twill services properly shutdown. LOG.warn("Exception when calling runnable.destroy.", t); } finally { context.stop(); } }
@Override protected void doStop() throws Exception { commandExecutor.shutdownNow(); try { runnable.destroy(); } catch (Throwable t) { // Just catch the exception, not propagate it since it's already in shutdown sequence and // we want all twill services properly shutdown. LOG.warn("Exception when calling runnable.destroy.", t); } finally { context.stop(); } }