Have you enabled annotation-driven transactions with a line like this in your Spring config file?
If you have then try enabling DEBUG-level logging for the org.springframework package and exercise the code to see what output is logged. This will let you see what Spring is doing behind the scenes; e.g. which transactional methods it discovers, committing or rolling-back at transactional boundaries, etc. I've done this before to diagnose transaction-related problems.
posted 6 years ago
1. Thanks. I had that line of code.
2. Basically, I unit test the DAO alone and from log, it show committed:
10 Apr 2014 20:06:56,100 321746 [main] DEBUG JpaTransactionManager - Initiating transaction commit
3. While testing another thing, I got exception and found some how my web.xml is missing OpenEntityManagerInViewFilter for JPA.
Once I put the filter the initial flow worked OK.
Evildoers! Eat my justice! And this tiny ad's justice too!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop