I don't think the Spring Framework documentation emphasizes it enough: "The most important concepts to grasp with regard to the Spring Framework's declarative transaction support are that this support is enabled via AOP proxies" (Spring's Declarative Transaction Management documentation). I know, I know! It's all my fault but even when I read those lines it really didn't "click": I thought that I was having issues because I've decided to use the OpenSessionInView pattern and believed that I needed to add transaction management to my newest Manager class. So, I've spent more than a day trying to figuring out how to fix this issue when the functionality was there all along. The deal was that my manager wasn't being proxied because it was defined as an inner bean (which can be a good practice in some cases but totally not when you want your bean to be proxied [Spring Best Practices]) :|
No comments:
Post a Comment