title: What is the best practice for managing thread pools in a container?
body: <p>I need to be able to achieve two threading tasks in a container and need to understand the best practices for doing this.  Here are the two classes of task I need to accomplish:</p>
  
  <ol>
  <li>During a web services call, I need to start a thread that continues processing after the response has been sent.  No message is required back to the original sender when processing is complete.</li>
  <li>A web services call may need to spawn multiple threads that need to run in parallel to each other.  The response to the original request should be blocked until all the workers have completed.  Elements of the response will be drawn from pieces of each of the thread's results.</li>
  </ol>
  
  <p>Of course, I could create my own instance of a <code>java.util.concurrent.Executor</code> and use it, but I suspect containers might be smart enough to provide one that they manage.</p>
  
  <p>FWIW - I'm using WebSphere 6.1 on JDK 1.5.0 (I know, ancient...but it is what it is).  I am running web services developed using Apache CXF, so I'm in the servlet container, but configured with Spring.</p>