AfterReturning « Exception « Spring Q&A





1. Why is @AfterReturning only executed after @AfterThrowing on exception?    stackoverflow.com

I have the following:

@AfterReturning("executionOfTrustedAnnotatedMethod()")
public void afterReturningFromTrustedMethodExecution() { ... }

@AfterThrowing(pointcut = "executionOfTrustedAnnotatedMethod()")
public void afterThrowingByExecutionOfTrustedAnnotatedMethod() { ... }
And Im observing this behaviour which does not make sense to me:
  • If the method captured by ...

2. AfterReturning advice executing after exception?    forum.springsource.org

AfterReturning advice executing after exception? Ok, according to the documentation After returning advice runs when a matched method execution returns normally. It is declared using the AfterReturning annotation: So, I've got ...