This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Using singleton TaskExecutor and CompletionService
Zhui Shen Ge
Greenhorn
Joined: Nov 22, 2009
Posts: 5
posted
0
Requirement: JMS listener to spawn multiple concurrent web service requests. Each listener thread (the main thread) will wait max of 30 seconds. A maximum number of 5 child threads might be spawned from the main thread.
Is it safe to use a singleton TaskExecutor (I intend to use Spring's ThreadPoolTaskExecutor), and creating new instances of ExecutorCompletionService in the main thread?