I want to test that rollbacks occur correctly within my DAO objects. So I thought I would use AOP and place an advice on HibernateTemplate method(s) that are called in my DAOs. This advice would be executed after one db action and it would alter the database in such as way that I know would cause a db error in the next db action within the transaction hence a rollback should be performed.
I'm trying to add an AfterReturningAdvice to HibernateTemplate, but I get "org.springframework.aop.framework.AopConfigExcept ion: Cannot create AopProxy with no advisors and no target source".
I'm able to add one to my own class. Is it possible to add an adivce to HibernateTemplate?
Thanks.


Reply With Quote