David Newton wrote:@Mark: using Spring? I didn't know that--this could be useful; nobody lets me use compile-time AspectJ.
Yep Spring AOP has 5 advice types
Before
AfterReturning, called after the target, but only if the target successfully returned.
AfterThrowing, called after the target, but only if the target throws an exception.
After, always called after the target.
Around, called before and after, but you are responsible for calling the target with a call to ProceedingJoinpoint's proceed method. And you are responsible for returning the target's return object from the advice method.
Mark