title: Why are WebMethods blocked when threads are synchronized?
body: <p>Please see my code example of a JAX-WS Webservice:</p>
  
  <pre><code>@WebService
  public class ClassA {
  
  @WebMethod
  public synchronized void doSomething() {
      new Thread(new Runnable() { // Thread X
          @Override
          public void run() {
              synchronized (ClassA.this) {
                  // Do something which should be run in this separate
                  // thread, but not twice at the same time
                  try {
                      System.out.println("Thread X Start");
                      Thread.sleep(10000);
                      System.out.println("Thread X End");
                  } catch (InterruptedException e) {
                  }
              }
          }
      }).start();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>If the WebMethod is called twice, the second call is waiting for thread X to complete - why? </p>