Community
Participate
Working Groups
HandlerWrapper is-a AggregateLifeCycle and as such manages dependent beans. Currently, HandlerWrapper.doStop() first calls super.doStop() and then stops the handler it wraps. However, some handler like ConnectHandler depend on beans (such as the thread pool) that may be stopped before the handler itself is stopped, causing warnings such as "1 threads could not be stopped", or "Dispatched Failed!", or race conditions where the handler thinks it is fully working, but other components are already stopped. HandlerWrapper.doStop() should first stop the wrapped handler and then forward the call to super.
Fixed by stopping the handler first and then calling super.