ElPapa
Oct 21st, 2004, 04:26 PM
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?
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?