Results 1 to 3 of 3

Thread: AutoProxy All Implementations of an Interface?

  1. #1
    Join Date
    Nov 2004
    Posts
    2

    Default AutoProxy All Implementations of an Interface?

    Is there a way to autoproxy all implementations of a specific interface in the applicationContext? If so, can I have my Advice only execute for specific methods? For example, whenever the save() method is called on my DAOs, I want to be able to time it. But, only the save() methods.

    Thanks.


    -sean z

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    You should be able to use an Advisor that has a method pointcut on that particular method. Pointcuts are used to filter which methods advice should apply to, and the autoproxy infrastructure uses this to determine which objects should wrapped in proxies.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Nov 2004
    Posts
    2

    Default

    Rod,
    Are you referring to using NameMatchMethodPointcutAdvisor or StaticMethodMatcherPointcutAdvisor? If so, I believe the auto proxy facility will match on every object in the container that has a save() method, not just the one's implementing my DAO interface. Is this correct?


    -sean z

Similar Threads

  1. Replies: 2
    Last Post: May 4th, 2005, 10:39 PM
  2. Newbie's question: design interface for remote access
    By Savagearts in forum Architecture
    Replies: 2
    Last Post: Mar 17th, 2005, 12:02 AM
  3. Replies: 1
    Last Post: Mar 16th, 2005, 01:40 PM
  4. Program to an interface...
    By klr8 in forum Architecture
    Replies: 1
    Last Post: Jan 24th, 2005, 09:27 PM
  5. Replies: 2
    Last Post: Nov 22nd, 2004, 04:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •