User Tools

Site Tools


tracing:ex2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tracing:ex2 [2008/10/06 17:08] bdefraintracing:ex2 [2021/02/05 13:55] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Tracing: Exposing the Receiver ======+[[tracing:intro|Intro]] 
 +[[tracing:ex1|Ex1]] 
 +[[tracing:ex2|Ex2]] 
 +[[tracing:ex3|Ex3]] 
 +====== Tracing: Exposing the receiver ======
  
 **Task:** Pass the suite ''tests.ReceiverTraceOutput''. **Task:** Pass the suite ''tests.ReceiverTraceOutput''.
Line 16: Line 20:
 Do you receive ''StackOverflowError''s? This is a common pitfall in AspectJ (see [[http://www.eclipse.org/aspectj/doc/released/faq.html#q:infiniterecursion|the FAQ entry]]). An infinite loop occurs because inside of the control-flow of the advice body is a new matching join point, which causes a new invocation of the advice body, which causes a new join point and so on. Do you receive ''StackOverflowError''s? This is a common pitfall in AspectJ (see [[http://www.eclipse.org/aspectj/doc/released/faq.html#q:infiniterecursion|the FAQ entry]]). An infinite loop occurs because inside of the control-flow of the advice body is a new matching join point, which causes a new invocation of the advice body, which causes a new join point and so on.
  
-To discover the root of the infinite loop, consider the difference between this advice body and the one from the previous exercise. Another clue is the official description of [[http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#39990|string concatenation]]. Solve the problem by making the pointcut more restrictive: it should exclude join points in the control flow of the advice execution.+To discover the root of the infinite loop, consider the difference between this advice body and the one from the previous exercise. Another clue is in the "officialdescription of  [[http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#39990|Java String Concatenation]]. Solve the problem by making the pointcut more restrictive: it should exclude join points in the control flow of the advice execution.
 </note> </note>
  
Line 22: Line 26:
  
 After you have completed the exercise, remove your aspect from the build path; then continue with [[tracing:ex3|Exercise 3]]. After you have completed the exercise, remove your aspect from the build path; then continue with [[tracing:ex3|Exercise 3]].
 +
tracing/ex2.1223305713.txt.gz · Last modified: 2008/10/06 17:08 by bdefrain