Results 1 to 3 of 3

Thread: access to target object of the methodInvocation

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Posts
    9

    Default access to target object of the methodInvocation

    Hi

    I have a name match method interceptor for a class TestClass for the method TestMethodOne.

    In the interceptor based on a decision, i would like to call TestMethodTwo of the same class.

    But i don't have access to the target object of the methodInvocation inside the invoke().

    Is this the right way to approach the issue? was it the intentional to not allow access to the Target object inside the invocation?

    thanks

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

    Default

    You do have access to the target. Use
    Code:
    MethodInvocation.getThis()
    which is inherited from Joinpoint.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Sep 2004
    Posts
    9

    Default

    Thanks..it was my mistake ...i didn't notice it

Similar Threads

  1. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  2. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  3. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  4. Loosing my SecureContext
    By sklakken in forum Security
    Replies: 3
    Last Post: Jul 21st, 2005, 01:44 PM
  5. Replies: 38
    Last Post: May 11th, 2005, 02:49 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
  •