Please review the following classes:
The pointcut below are too generic and I was expecting an infinite recursively loop when triggered. But to my surprise it didn't happen when I ran it.
Why beforeTraced() and afterTraced() do not run into infinite recursively loops when triggered??
Code:package com.simple.aspect.log; @Aspect public class LogManagerAspect { private Log log = LogFactory.getLog(getClass()); @Before("execution(* com.simple..*.*(..))") public void beforeTraced(JoinPoint pjp) { Signature sig = pjp.getSignature(); if (sig != null) log.info("Entering [" + sig.toShortString() + "]"); } @After("execution(* com.simple..*.*(..))") public void afterTraced(JoinPoint pjp) { Signature sig = pjp.getSignature(); if (sig != null) log.info("Leaving [" + sig.toShortString() + "]"); } }


Reply With Quote