title: Can/should Spring reuse Hibernate Session for sub-transaction (REQUIRES_NEW)
body: <p>I have a transactional service calling a second one with a REQUIRES_NEW propagation. </p>
  
  <p>Activating logs I see that Spring creates a new Hibernate Session when creating the sub-transaction, even though there is already an open Session for the current Thread.</p>
  
  <pre><code>[DEBUG] org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource.getTransactionAttribute(AbstractFallbackTransactionAttributeSource.java:106) Adding transactional method 'executeProcessed' with attribute: PROPAGATION_REQUIRES_NEW,ISOLATION_DEFAULT; ''
  [DEBUG] org.springframework.orm.hibernate3.HibernateTransactionManager.doGetTransaction(HibernateTransactionManager.java:437) Found thread-bound Session [org.hibernate.impl.SessionImpl@467743d7] for Hibernate transaction
  [DEBUG] org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:415) Suspending current transaction, creating new transaction with name [com.microsigns.ds.businesslogic.rendering.service.impl.PipelineDataServiceImpl.executeProcessed]
  [DEBUG] org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:493) **Opened new Session** [org.hibernate.impl.SessionImpl@3d4b1aad] for Hibernate transaction
  [DEBUG] org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:504) Preparing JDBC Connection of Hibernate Session [org.hibernate.impl.SessionImpl@3d4b1aad]
  [DEBUG] org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:569) Exposing Hibernate transaction as JDBC transaction [jdbc:postgresql://localhost:5432/ds, UserName=microsignsdds, PostgreSQL Native Driver]
  </code></pre>
  
  <p>Shouldn't it be better performance-wise to reuse the session? This would also avoid having to reload or re-attach objects in the sub-transaction. What am I missing here?</p>
  
  <p>This behavior is hardcoded in org.springframework.orm.hibernate3.HibernateTransactionManager:</p>
  
  <pre><code>xObject.getSessionHolder().setSynchronizedWithTransaction(true);
  </code></pre>
  
  <p>I am using hibernate 3.6 and Spring 3.1</p>