title: When the transaction will be committed?
body: <p>I need some clarification regarding Spring transation.
  In <code>ClassA</code> I am creating a declaritive transaction. From <code>ClassA</code> I am calling <code>method1()</code> of <code>ClassB</code>.
  <code>ClassB</code> is having <code>@Transactional(propagation = Propagation.REQUIRED)</code> annotation in classs level.
  In <code>method1()</code> I am doing a save operation.</p>
  
  <p>My question is, when that data will be committed ? Will it be committed while control will come out from 
  <code>method1()</code>? or in <code>ClassA</code> where we are committing the transaction manually ?. </p>
  
  <p>Code:</p>
  
  <p><strong>ClassA</strong></p>
  
  <pre><code>class ClassA {
  
      void myMethod() {
          TransactionStatus status = null;
          DefaultTransactionDefinition def =
                  new DefaultTransactionDefinition(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
          def.setTimeout(contentFileProcessingConfigBean.getFileCopyTransactionTimeout());
          status = transactionManager.getTransaction(def);
  
          b.method1();
  
          if (status != null) {
              transactionManager.commit(status);
          }
      }
  
  }
  </code></pre>
  
  <p><strong>ClassB</strong></p>
  
  <pre><code>@Transactional(propagation = Propagation.REQUIRED)
  class ClassB {
  
  void method1() {
  
  //doing save operation
  
  }
  }
  </code></pre>