Announcement Announcement Module
No announcement yet.
Aspects instances scheme-based Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Aspects instances scheme-based

    Hi, Spring expert
    I'm working with scheme-based AOP support, and i canīt have more one
    instance of aspect (bean) when intercepts the same event but of diferent domains beans. I need save a state in the aspects, then i need more one instance. Can i do this with scheme-bases support?? how???
    Sorry for my english.
    Thanks and bye

  • #2
    Spring uses a proxy based aop approach and therefor needs instances. So basically what you want isn't available with this approach, if you want more you want to revert to full blown aspectj and loadtime and/or compile time weaving.

    As a workaround you could store the state in a ThreadLocal instead of the instance of the Aspect.