title: How to make a Web Service be use multiple threads?
body: <p>I have a simple java web service.  I want to have the web service be threaded, where each call to a web method gets its own thread to do processing. The processing takes a long time and I don't want it to block, prevent other calls to the web method from happening. Instead, I want the web method to only create the Threads and for the Thread itself to respond/return a value to the client after its done processing. Is that possible?</p>
  
  <p>EDIT:</p>
  
  <p>Here's a semi-pseudocode of what I have right now:</p>
  
  <pre><code>@WebService(endpointInterface="Service")
  public class ServiceImpl {
  
      public ServiceImpl() 
      {
          // Initialization
      }
  
      public String GetResult(input)
      {
          // Does long processing
  
          return Result;
      }
  }
  </code></pre>
  
  <p>What I want to do is instead of GetResult() doing the long processing, I want it only spawn the Runnable that will do the long processing and have GetResult() return and ready to service another request. I also want the Runnable to respond to the waiting client.</p>
  
  <p>EDIT 2:</p>
  
  <p>I just realized that I'm asking a silly question. I'm fairly new to implement WS's. I had thought that WS's only took one request at a time sequentially. I didn't know each request is already automatically threaded.</p>