• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

multiple implementations of an interface in a single ProxyFactoryBean?

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm using the ProxyFactoryBean in order to fire off an interceptor for a particular service (see below).

Now, I've got a few other service implementations using the same interface which I also want to use with the same interceptor.
Is there a neat way of specifying all these implementations in the same ProxyFactoryBean so that I don't have to create a ProxyFactoryBeans
for each one of them?

Thanks
S
 
Ranch Hand
Posts: 451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There actually are a large number of ways to solve this problem, far too many alternatives to cover here. All of them involve using the autoproxy facility. There is decent coverage of this topic in the manual. In Spring 2.5.4, this in

Chapter 7.9. Using the "autoproxy" facility

.

You will need to determine which autoproxy technology makes the most sense for you. If you are using Java 5 or later, metadata-driven auto-proxying is a particularly nice choice. We are using this quite nicely where I work.
 
Sven Anderson
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks alot.

Using autoproxies seems to work fine for me in this case. Thanks for the tips
 
reply
    Bookmark Topic Watch Topic
  • New Topic