Code:
14:56:13,532 DEBUG [TransactionInterceptor] Getting transaction for net.vitarara.quadran.core.business.QEntityLifeCycleManager.createEntity
14:56:13,532 DEBUG [JpaTransactionManager] Using transaction object [org.springframework.orm.jpa.JpaTransactionManager$JpaTransactionObject@fac173]
14:56:13,532 DEBUG [JpaTransactionManager] Creating new transaction with name [net.vitarara.quadran.core.business.QEntityLifeCycleManager.createEntity]
14:56:13,532 DEBUG [JpaTransactionManager] Opened new EntityManager [org.hibernate.ejb.EntityManagerImpl@b2a51f] for JPA transaction
14:56:13,532 DEBUG [SessionImpl] opened session at timestamp: 4739279149187072
14:56:13,532 DEBUG [JDBCTransaction] begin
14:56:13,532 DEBUG [ConnectionManager] opening JDBC connection
14:56:13,533 DEBUG [JDBCTransaction] current autocommit status: true
14:56:13,533 DEBUG [JDBCTransaction] disabling autocommit
14:56:13,533 DEBUG [TransactionSynchronizationManager] Bound value [org.springframework.orm.jpa.EntityManagerHolder@2ba6d7] for key [org.springframework.orm.jpa.LocalEntityManagerFactoryBean@4f7301] to thread [http-0.0.0.0-8080-1]
14:56:13,533 DEBUG [TransactionSynchronizationManager] Initializing transaction synchronization
14:56:13,533 INFO [STDOUT] [Quadran] In: net.vitarara.quadran.core.business.impl.party.PartyManagerImpl.createEntity ()
14:56:13,533 INFO [STDOUT] [Quadran] In net.vitarara.quadran.core.business.impl.party.DefaultCreatePartyProcessor.execute ()
14:56:13,535 INFO [STDOUT] [Quadran] In net.vitarara.quadran.core.data.jpa.PartyDaoJpaImpl.persist ()
14:56:13,537 DEBUG [SessionImpl] opened session at timestamp: 4739279149203456
14:56:13,557 DEBUG [AbstractSaveEventListener] generated identifier: 6596a2e0cc61af8300c2a9231e2c1123, using strategy: org.hibernate.id.Assigned
14:56:13,579 DEBUG [TransactionInterceptor] Getting transaction for net.vitarara.quadran.core.business.QEntityLifeCycleManager.createEntity
14:56:13,579 DEBUG [TransactionSynchronizationManager] Retrieved value [org.springframework.orm.jpa.EntityManagerHolder@2ba6d7] for key [org.springframework.orm.jpa.LocalEntityManagerFactoryBean@4f7301] bound to thread [http-0.0.0.0-8080-1]
14:56:13,579 DEBUG [JpaTransactionManager] Found thread-bound EntityManager [org.hibernate.ejb.EntityManagerImpl@b2a51f] for JPA transaction
14:56:13,579 DEBUG [JpaTransactionManager] Using transaction object [org.springframework.orm.jpa.JpaTransactionManager$JpaTransactionObject@17999e]
14:56:13,579 DEBUG [JpaTransactionManager] Participating in existing transaction
14:56:13,579 INFO [STDOUT] [Quadran] In net.vitarara.quadran.core.data.jpa.ContactMechanismDaoJpaImpl.persist ()
14:56:13,581 DEBUG [JpaTemplate] Creating new EntityManager for JPA template execution
14:56:13,581 DEBUG [SessionImpl] opened session at timestamp: 4739279149387776
14:56:13,581 DEBUG [AbstractSaveEventListener] generated identifier: 6596a30bcc61af830066876803749672, using strategy: org.hibernate.id.Assigned
14:56:13,582 DEBUG [AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
14:56:13,582 DEBUG [ConnectionManager] opening JDBC connection
14:56:13,582 DEBUG [SQL] select partyjpaim_.id, partyjpaim_.firstName as firstName134_, partyjpaim_.lastName as lastName134_ from party partyjpaim_ where partyjpaim_.id=?
14:56:13,582 INFO [STDOUT] Hibernate: select partyjpaim_.id, partyjpaim_.firstName as firstName134_, partyjpaim_.lastName as lastName134_ from party partyjpaim_ where partyjpaim_.id=?
14:56:13,583 DEBUG [AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
14:56:13,583 DEBUG [ConnectionManager] aggressively releasing JDBC connection
14:56:13,583 DEBUG [ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
14:56:13,584 DEBUG [JpaTemplate] Closing new EntityManager after JPA template execution
14:56:13,584 DEBUG [TransactionInterceptor] Invoking commit for transaction on net.vitarara.quadran.core.business.QEntityLifeCycleManager.createEntity
14:56:13,584 DEBUG [TransactionInterceptor] Invoking commit for transaction on net.vitarara.quadran.core.business.QEntityLifeCycleManager.createEntity
14:56:13,584 DEBUG [JpaTransactionManager] Triggering beforeCommit synchronization
14:56:13,584 DEBUG [JpaTransactionManager] Triggering beforeCompletion synchronization
14:56:13,584 DEBUG [JpaTransactionManager] Initiating transaction commit
14:56:13,584 DEBUG [JpaTransactionManager] Committing JPA transaction on EntityManager [org.hibernate.ejb.EntityManagerImpl@b2a51f]
14:56:13,584 DEBUG [JDBCTransaction] commit
14:56:13,585 DEBUG [JDBCTransaction] re-enabling autocommit
14:56:13,585 DEBUG [JDBCTransaction] committed JDBC Connection
14:56:13,585 DEBUG [ConnectionManager] aggressively releasing JDBC connection
14:56:13,585 DEBUG [ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
14:56:13,585 DEBUG [JpaTransactionManager] Triggering afterCompletion synchronization
14:56:13,585 DEBUG [TransactionSynchronizationManager] Clearing transaction synchronization
14:56:13,586 DEBUG [TransactionSynchronizationManager] Removed value [org.springframework.orm.jpa.EntityManagerHolder@2ba6d7] for key [org.springframework.orm.jpa.LocalEntityManagerFactoryBean@4f7301] from thread [http-0.0.0.0-8080-1]
14:56:13,586 DEBUG [JpaTransactionManager] Closing JPA EntityManager [org.hibernate.ejb.EntityManagerImpl@b2a51f] after transaction
It looks to me that when getJpaTemplate is being called a new Hibernate Session in being created that doesn't seem to be part of the transaction. Am I right?