• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Can we have more than one proxycreator for same bean

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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">
<list>
some interceptord defined here

</list>
</property>
</bean>

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

</list>
</property>
</bean>

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
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic