title: Getting current transaction reference of JpaTransactionManager
body: <p>We have started transaction in our service layer with @Transactional (org.springframework.transaction.annotation.Transactional). We need to get current transaction reference in data access layer? Is there any way we can get reference of current transaction?</p>
  
  <p>Below is the transaction configuration in our case:</p>
  
  <p><strong>JPA Configuration</strong>
  
      </p>
  
  <pre><code>&lt;bean id="entityManagerFactory"
      class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
      p:persistenceUnitName="pUnitName"
      p:persistenceXmlLocation="classpath*:persistence.xml"
      p:dataSource-ref="dataSource" p:jpaVendorAdapter-ref="jpaAdapter"&gt;
      &lt;property name="loadTimeWeaver"&gt;
          &lt;bean
              class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" /&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  &lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"
      p:entityManagerFactory-ref="entityManagerFactory" /&gt;
  &lt;bean id="jpaAdapter"
      class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
      p:database="ORACLE" p:showSql="true" /&gt;
  </code></pre>