Description
Jacques Couzteau opened SPR-5195 and commented
Transactions do not time out even the time out is specified. I use
org.springframework.orm.jpa.JpaTransactionManager
I tried annotations on methods, i.e.
@Transactional
(readOnly = false, timeout = 1)
public interface MyService {...}
as well as the property on the bean:
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
<property name="defaultTimeout" value="1"/>
</bean>
The timeout never triggers a rollback.
Also see this thread: http://forum.springframework.org/showthread.php?t=60517
My EntityManagerFactoryBean:
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"/>
</property>
<property name="jpaProperties">
<util:properties location="classpath:com/adobe/codex/dao/jpa/hibernate.properties"/>
</property>
</bean>
my datasource, but I also tried with other datasources in order to run independent of JBoss, i.e. Tomcat and jetty.
<jee:jndi-lookup id="dataSource" jndi-name="java:CodexDS" />
Affects: 2.5.5
Referenced from: commits 45dc856