template for interceptor stack?
Hi,
is there a way to defne some form of template for an interceptor stack?
I have a lot of services defined in a spring application context that should all be intercepted by a stack of the same interceptors. Instead of defining a ProxyFactoryBean with a list of the same interceptors *for every* service, I like to define this interceptor-list only once and wire it with the least possible amount of typing in the application context xml file.
Thanks for any hints that could help me!
Felix
template for interceptor stack?
Hi Felix,
I am also interested in that approach. If you read my recent posting (http://forum.springframework.org/showthread.php?t=12675) you'll see that I tried to create a parent "EnterpriseBeanTemplate" to apply a series of interceptors to several POJOs.
Unfortunately Spring throws an Exception during application context initialization.
Another approach I am trying is to use BeanNameAutoProxyCreator to apply interceptor stacks to several beans identified by name (with wildcards). Several interceptors/advisors use source code annotations to figure out the pointcut. So far this approach is working nicely.
Best regards,
Fernando