I\'m trying to make simple application using Spring, JPA and embedded H2 database. Recently I\'ve come across this strange issue with declarative transactions. They just doe
Probably because the component-scan in your spring-servlet.xml is also including your DAO classes in its scanning and therefore creating instances for them in its application context (not the "database" one)... so that when your web accesses these DAOs from web controllers, it is accessing non-transactional versions of them (unless you add that tx:annotation-driven tag).
Therefore, adding that tag is in fact a bad solution because it still creates your DAO instances in the wrong application context: better create a more specific base-packageconfiguration for your web layer component creation.
I had this same problem because I thought a in my spring-servlet.xml was taking care of only scanning @Controller classes... but no :-(