title: Why are there different types of transaction manager?
body: <p>I am confused about different types of transaction manager in a web application:</p>
  
  <p><strong>Spring transaction manger vs JPA transaction manager vs Hibernate transaction manager vs JTA transaction manger vs database transaction manager</strong></p>
  
  <p>I did some googling about the above transaction managers but am still not clear.</p>
  
  <p>For example:</p>
  
  <p><code>Hibernate tx manager</code> uses <code>Database tx manager</code></p>
  
  <p><code>JPA tx manager</code> uses <code>Hibernate tx</code>
   manager</p>
  
  <p><code>Spring tx manager</code> uses <code>JPA transaction manager</code> or <code>JTA tx manager</code></p>
  
  <p>Edited:
   Configuration Example from my application is below:
  samaple </p>
  
  <pre><code>&lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
          &lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
          &lt;property name="jpaDialect"&gt;
              &lt;bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" /&gt;
          &lt;/property&gt;
      &lt;/bean&gt; 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>&lt;prop key="hibernate.transaction.jta.platform"&gt;org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform&lt;/prop&gt;
                  &lt;prop key="transaction.auto_close_session"&gt;true&lt;/prop&gt;
                  &lt;prop key="current_session_context_class"&gt;jta&lt;/prop&gt;
  </code></pre>
  
  <p>so if I consider above example does JPA transaction manger uses hibernate transaction manager and in turn hibernate manger uses JTA manager am I corrrect?</p>
  
  <p>Does this mean every transaction manager uses an underlying transaction manager? </p>