This week's giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of liveProject: Build an ML Recommender System and have Kim Falk on-line!
See this thread for details.
Win a copy of liveProject: Build an ML Recommender System this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

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
 
And then the entire population worshiped me like unto a god. Well, me and this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic