title: Adding session synchronization to Spring MVC
body: <p>I need to add session synchronization to a Spring MVC application.  I'm using Spring 3.1.2.</p>
  
  <p>The synchronization is required because I will have multiple AJAX calls updating session data.  Rather than synchronize the session data within the web app, the design decision was made to force the incoming calls to be processed synchronously.</p>
  
  <p>In my servlet.xml, I have the following:</p>
  
  <pre><code>&lt;mvc:annotation-driven /&gt;
  &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"&gt;
      &lt;property name="synchronizeOnSession" value="true" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Yet if I do two AJAX calls from the same session to the same request handler, they both will execute at the same time.  I was expecting the synchronizeOnSession to prevent this.</p>
  
  <p>Am I missing something in the configuration?</p>