title: Spring transaction REQUIRED vs REQUIRES_NEW : Rollback Transaction
body: <p>I have a method that has the <code>propagation = Propagation.REQUIRES_NEW</code> transactional property:</p>
  
  <pre><code>@Transactional(propagation = Propagation.REQUIRES_NEW)
  public void createUser(final UserBean userBean) {
      //Some logic here that requires modification in DB
  }
  </code></pre>
  
  <hr>
  
  <p>This method can be called multiple times simultaneously, and for every transaction if an error occurs than it's rolled back (independently from the other transactions).</p>
  
  <p>The problem is that this might force Spring to create multiple transactions, even if another one is available, and may cause some performance problems.</p>
  
  <hr>
  
  <p>Java doc of <code>propagation = Propagation.REQUIRED</code> says: <code>Support a current transaction, create a new one if none exists.</code></p>
  
  <p>This seems to solve the performance problem, doesn't it?</p>
  
  <p>What about the rollback issue ? What if a new method call rolls back while using an existing transaction ? won't that rollback the whole transaction even the previous calls ?</p>
  
  <p><strong>[EDIT]</strong>
  I guess my question wasn't clear enough:</p>
  
  <p>We have hundreds of clients connected to our server. </p>
  
  <p>For each client we naturally need to send a feedback about the transaction (OK or exception -> rollback). </p>
  
  <p>My question is: if I use <code>REQUIRED</code>, does it mean only one transaction is used, and if the 100th client encounters a problem the 1st client's transaction will rollback as well ?</p>