Jun 5th, 2008, 01:01 PM
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?
Tags for this Thread