Back Forum Reply New

general proxy/interceptor questions...

If I were to define a BeanNameAutoProxyCreator like this:Code:   lt;bean name=quot;myServiceProxyCreatorquot; class=quot;org..aop.framework.autoproxy.BeanNameAutoProxyCreatorquot;gt;       lt;property name=quot;beanNamesquot; value=quot;*Servicequot;/gt;       lt;property name=quot;interceptorNamesquot;gt;lt;listgt;    lt;valuegt;performanceMonitoringInterceptorlt;/valuegt;       lt;/listgt;       lt;/propertygt;   lt;/beangt;
Does the same instance of the bean quot;performanceMonitoringInterceptorquot; get used in each proxy that gets created?  Is this driven by how my performanceMonitoringInterceptor bean is configured by spring (id isSingleton=false)?

Josh

If your performanceMonitoringInterceptor is defined as 'prototype' then a different instance is used in each proxy that is created. BeanNameAutoProxyCreator uses getBean() method from BeanFactory to get the interceptors.
¥
Back Forum Reply New