Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 341206

Summary: Stop order is wrong in HandlerWrapper
Product: [RT] Jetty Reporter: Simone Bordet <simone.bordet>
Component: serverAssignee: Simone Bordet <simone.bordet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox
Version: 7.3.1   
Target Milestone: 7.3.x   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Simone Bordet CLA 2011-03-29 06:28:01 EDT
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.
Comment 1 Simone Bordet CLA 2011-03-29 06:30:20 EDT
Fixed by stopping the handler first and then calling super.