Announcement Announcement Module
Collapse
No announcement yet.
How to intercept overriden methods Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to intercept overriden methods

    Hi all,

    I've been searching this forum but after a couple of hours I still don't get the right answer.

    Following my advisor definition:

    Code:
    <aop:advisor advice-ref="segmentoHistoryAdvice" 
       			 pointcut="execution(* *..service.GenericManager.save(..)) and args(model.Segmento,..)" />
    The method save is defined in the GenericManager interface and takes a Generic argument

    Code:
    public void save(T object) {...}
    and implemented by a GenericManagerImpl class.

    I had subclassed GenericManagerImpl class and override save. The problem is that my advisor is not intercepting the call. How to declare an advisor which will intercept the calls to a overiding generic method?

  • #2
    What version of Spring are you using ? There has been a bug report about aop problems with method interception using generics parameter: http://opensource.atlassian.com/proj...rowse/SPR-3556.

    Comment


    • #3
      Thanks for the answer. That seems to be the reason.
      Let's wait for the fix.

      Once again thank you!

      Comment


      • #4
        The bug is marked as fixed. Take a nightly build of Spring 2.0.7 version and give it a try.

        Comment

        Working...
        X