Announcement Announcement Module
Collapse
No announcement yet.
Is there a way to modify aspects at runtime for prototype scoped beans? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a way to modify aspects at runtime for prototype scoped beans?

    Is there a way to modify (i.e. add/remove) aspects for prototype scoped beans at runtime?

    I can successfully modify aspects for singleton scoped beans at runtime allowing me to enable or disable such things as monitoring by dynamically adding and removing aspects using the Advised interface and manipulating the proxy chain of a bean.
    Unfortunately this approach doesn't work for prototype scoped beans.
    I guess that for prototype scoped beans I rather have to somehow modify the application context so that next time someone requests a prototype bean it Spring provides one with the apropriate proxies, but I'm not sure if this is possible.

    Does anyone know a way for doing this?
    Any pointers?

    Regards
Working...
X