public void doStop() throws Exception { setShutdown(true); // just wait a little while to ensure no requests are still being processed Thread.currentThread().sleep(500L); super.doStop(); }