Hm... That is a good question. I am NOT committing the transaction in my test. However, I am using the JPATransactionManager to coordinate my transations. It is defined like this:
Code:
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource">
<ref bean="data-source" />
</property>
<property name="persistenceUnitName">
<value>local-jedi-persistence-test</value>
</property>
<property name="persistenceXmlLocation">
<value>/itest/local-jedi-persistence.xml</value>
</property>
</bean>
<bean id="tranactionManager" name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
I am using @Transactional annotation in my Junit4 test too.
Do I have an error in my configuration? Did I leave out something?