Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In Spring AOP, I can add an aspect at the following locations

  • before a method executes (using MethodBeforeAdvice)
  • after a method executes (using AfterReturningAdvice)
  • around a method (both before and after a method executes) (using MethodInterceptor)

If I have all three types of advice, is the order of execution always as follows?

  • Around (before part)
  • Before
  • Method itself
  • After
  • Around (after part)
share|improve this question
    
What? 15 char.. –  David Cowden Sep 13 '12 at 8:35
    
You'd do better searching for an answer to this on Stack Overflow; that's the place for programming questions with a simple, correct answer. –  Donal Fellows Sep 13 '12 at 8:51
    
@Donal Fellows My bad. I thought this would be more theoretical than is allowed in Stack Overflow –  Chetter Hummin Sep 13 '12 at 9:41
    
Please go through the link. To understand the ordering of Spring AOP advices: ordering of Spring AOP advices –  user72945 Nov 18 '12 at 8:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.