views:

107

answers:

1

I am using JPA i have setup transaction on service layer using @Transactional..
it is working fine..
but when i test Dao (Junit) transactions using JpaTemplate are not getting commited.. although same test with JdbcTemplate were getting comitted...

So how to enable auto-commit for JpaTemplate...?

A: 

I am assuming you are calling you DAO's directly...

Do not attempt to configure auto-commit, it is not recommended. Instead, setup your test context like described here.

Hans Westerbeek