• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Can we have more than one proxycreator for same bean

Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a bean defined in my springcontextfile

<bean name="myBean" class="com.myTest.TestBean"/>

Now i create proxy for that bean

<bean id="testProxy" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames" value="myService"/>
<property name="interceptorNames">
some interceptord defined here


<bean id="myCustomservice" class="org.springframework.aop.framework.ProxyFactoryBean" >
<property name="target">
<bean class="com.myTest.TestBean" />
<property name="interceptorNames">
some interceptord defined here


I have few interceptor applied on TestBean bean. This interceptors are applied at different level and hence are configured in different files.So at runtime when the interceptors are applied which factorybean creator(ProxyFactoryBean,BeanNameAutoProxyCreator) will spring use to actuall get the proxy of the target bean.also is such kind of configuration is acceptable in spring.
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic