title: Spring Transactions With Supports Propagation
body: <p>I would like to understand the use of having a spring transaction with Propagation Supports. The java docs mention that if the method which has <code>@Transactional(propagation = Propagation.SUPPORTS)</code> is called from within a transaction it supports the transaction but if no transaction exists, the method is executed non-transactionally. </p>
  
  <p>Isn't this already the behavior of spring transactions irrespective of <code>Propagation.SUPPORTS</code>? </p>
  
  <pre>
  <code>
  
  public class ServiceBean {
  
      @Transactional(propagation = Propagation.SUPPORTS)
      public void methodWithSupportsTx() {
          //perform some database operations
      }
  }
  
  public class OtherServiceBean {
  
      @Transactional(propagation = Propagation.REQUIRED)
      public void methodWithRequiredTx() {
          //perform some database operations
          serviceBean.methodWithSupportsTx();
      }
  }
  
  </code>
  </pre>
  
  <p>In the above code example, irrespective of whether <code>methodWithSupportsTx()</code> has <code>@Transactional(propagation = Propagation.SUPPORTS)</code> annotation it would be executed in a transaction depending on whether <code>methodWithRequiredTx()</code> has <code>@Transactional</code> annotation, right?</p>
  
  <p>So what's the need/use of having a propagation level SUPPORTS?</p>