title: How to pass multiple parameters in @PUT method?
body: <p>I have a requirement to implement a method like this in Apache CXF JAX-RS(in a concurrent scenario)</p>
  
  <pre><code>@PUT
  @Path("/customers/123")
  public void updateConcurrentCustomer(Customer existingCustomer,Customer updatedCustomer,boolean forceUpdate){
  ......
  }
  </code></pre>
  
  <p>In request body, i need to call this method something like this (no root element). </p>
  
  <pre><code>&lt;Customer&gt;
  .....existing data....
  &lt;/Customer&gt;
  &lt;Customer&gt;
  ......updated data....
  &lt;/Customer&gt;
  &lt;boolean&gt;true&lt;/boolean&gt;
  </code></pre>
  
  <p>How this data binding can be achieved?</p>
  
  <p>I tried creating a composite wrapper Resource class like this</p>
  
  <pre><code>@XmlRootElement
  public class CustomCustomer implements java.io.Serializable
  {
      private Customer  existingCustomer;
      private Customer  updatedCustomer;
      private boolean forceUpdate;
      .....
      .....
  
  }
  </code></pre>
  
  <p>It works well. But i dont want to create this wrapper class.</p>
  
  <h2>My concurrency scenario:</h2>
  
  <ol>
  <li><p>customer123 object is in state A.</p></li>
  <li><p>user1 changes customer123 to state B.</p></li>
  <li><p>user2 changes customer123 to state C. </p></li>
  <li><p>user3 changes customer123 to state D. (all at same time)</p></li>
  </ol>
  
  <p>only high priority user sets forceUpdate flag and finally that update will be overwritten than others.</p>
  
  <p>existingCustomer - will be used to detect conflict changes. It will be in state A</p>