Results 1 to 4 of 4

Thread: Using AOP to get timing data

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Location
    Tacoma, WA USA
    Posts
    49

    Default Using AOP to get timing data

    Hi,

    I need to get timing data to deterimine the length of time a method call takes. I thought that perhaps AOP would be a good approach. Then I could have some sort of class store a "start time" in a MethodBeforeAdvice and then work with that class in the AfterReturningAdvice. However, I'm not sure of the approach for storing this state. I was thinking about having a class that uses ThreadLocal, but so far my attempts don't appear to be working. Perhaps I'm misusing ThreadLocal?
    ElPapa

    The delusion that people care about what I think:
    http://www.codethought.com/blog

  2. #2
    Join Date
    Aug 2004
    Location
    Denver
    Posts
    249

    Default

    You could use one of Spring's existing interceptors for this:

    http://www.springframework.org/docs/...terceptor.html

  3. #3
    Join Date
    Aug 2004
    Location
    Tacoma, WA USA
    Posts
    49

    Default

    I'll have to take a closer look at that. Thanks.
    ElPapa

    The delusion that people care about what I think:
    http://www.codethought.com/blog

  4. #4
    Join Date
    Aug 2004
    Location
    Tacoma, WA USA
    Posts
    49

    Default

    mraible,

    Thanks.. that took my approach in a whole other direction that was far more effective. I appreciate you pointing that out.
    ElPapa

    The delusion that people care about what I think:
    http://www.codethought.com/blog

Similar Threads

  1. Replies: 1
    Last Post: Aug 31st, 2005, 04:18 AM
  2. How to persist model data in session
    By thenakedsingularity in forum Web
    Replies: 8
    Last Post: Aug 4th, 2005, 01:04 PM
  3. Multiple Data Sources + Hibernate + Spring
    By joeserel in forum Data
    Replies: 2
    Last Post: May 18th, 2005, 09:22 AM
  4. injecting complex configuration data
    By fox9 in forum Container
    Replies: 2
    Last Post: Feb 25th, 2005, 07:23 AM
  5. Data Secutiry - Filtering Data
    By porcelli in forum Security
    Replies: 3
    Last Post: Dec 30th, 2004, 12:01 AM

Posting Permissions

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