How do I set flush mode to “COMMIT” in my configuration files?
I'm using Spring 3.1.1.RELEASE, Hibernate 4.1.0.Final, and JPA 2.0. Is there a way I can configure Spring transactions to commit after the transactions are executed without Java code? In other words, I would like to set flush mode to commit in either the application context file, hibernate configuration file, or persistence.xml file. My Spring transaction service class looks like @Transactional(rollbackFor = Exception.class) @Service public class ContractServiceImpl implements ContractService { @Autowired private ContractDAO m_contractDao; public void addContract(Contract contract) { m