This patch changes Dispatcher to use java.util.ExecutorService. This because of two reasons:
1. ExecutorService implementations provide all of that functionality that is missing and marked with TODO in the current Dispatcher implementation. In fact, my patch removes all TODOs in Dispatcher, because all of them have been dealt with.
2. Implementing a correctly working thread pool is a hard task. No offense, but I trust the Java core developers more than you when it comes to multi thread programming. Not because I think they're better programmers (probably not), but because they have a LOT of tests running up and down all the time, and there are more eyes watching. Millions.
The patch reduces Dispatcher to a thin facade over ExecutorService. Note that since I added a shutdown() method (you get this one for free), there's now a way to let ApplicationContext control the dispatcher lifecycle.
For motivation of this patch see discussion here: http://mail-archives.apache.org/mod_mbox/pivot-user/201004.mbox/%3CA820E617-DC9A-4843-89E4-36320482A1CF@mac.com%3E