title: Would you use AOP for database transaction management?
body: <p>A while back I wrote an application which used <a href="http://static.springframework.org/spring/docs/2.5.x/reference/aop.html" rel="nofollow noreferrer">Spring AOP</a> for defining which methods were transactional. I am now having second thoughts as to how much of a great idea this was; I have been hit a few times after a minor refactor (changing method signatures etc), which of course doesn't become apparent until something actually goes wrong (and I have a logically inconsistent database).</p>
  
  <p>So I'm interested in a few things:</p>
  
  <ol>
  <li>Have other people decided to revert to explicit transaction management (e.g. via <code>@Transactional</code> annotations)?</li>
  <li>Are there useful tools I can use as part of a build process to help identify whether anything has been "broken"?</li>
  <li>If people are using AOP to manage transactions, what steps are they taking to avoid the mistakes I've made?</li>
  </ol>
  
  <p>I'm using IntelliJ IDEA which allows you to browse decorated methods and will refactor Spring <code>XML</code> config together with method name changes, but this is not always sufficient (adding a parameter to a method in the wrong place can affect whether an aspect fires for example)</p>