public void shutdown() { logger.finest("Shutting down OperationService"); invocationRegistry.shutdown(); invocationMonitor.shutdown(); operationExecutor.shutdown(); asyncResponseHandler.shutdown(); slowOperationDetector.shutdown(); try { invocationMonitor.awaitTermination(TERMINATION_TIMEOUT_MILLIS); } catch (InterruptedException e) { // restore the interrupt. // todo: we need a better mechanism for dealing with interruption and waiting for termination Thread.currentThread().interrupt(); EmptyStatement.ignore(e); } }