Announcement Announcement Module
Collapse
No announcement yet.
Aspects not firing when method invoked from within same class Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Aspects not firing when method invoked from within same class

    I know that Spring AOP uses some kind of proxy class for its aspect implementation. The problem I'am having, is that my pointcuts are not working when I call the method that is adviced from within the same class.

    Is this something I have to live with? Lets say I have a class Me that contains the method A and B. When I call Me.A() from an external class the aspect is being used but not if I call Me.B() which then calls itself this.A(). Does that mean, a private method cannot be used in a pointcut?

  • #2
    Yes and No...

    If you would use full AspectJ pointcuts and full aspectJ you could do this. However with the Spring AOP implementation you cannot.

    Comment

    Working...
    X