Spring data @transactional not rolling back with SQL Server and after runtimeexception
问题 I've enabled my spring application to use transactions and annotated my service method accordingly but the changes to my DB persist when a RuntimeException is thrown. My Spring configuration looks like this: <!-- Data Source. --> <jee:jndi-lookup id="dataSource" jndi-name="java:/jdbc/BeheermoduleDS"/> <!-- JPA Entity Manager. --> <jee:jndi-lookup id="entityManagerFactory" jndi-name="java:/jpa/BeheermoduleDS"/> <bean id="txManager" class="org.springframework.orm.jpa.JpaTransactionManager">