I am using JSF1.2 framework. I didnt Integrate my application with Spring.I want to perform profiling on method invocations. my application file is EAR (EJB + WAR ). i can get the session beans methods execution time with the help of interceptor but for WAR module i was suggested to use AspectJ in this blog. so i have written some code. is there any thing i need to do like configuration details. I added the required jar file of AspectJ is JSF support AspectJ with any configuration? my code is:
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
@Aspect
public class AopInterceptor implements MethodInterceptor{
public AopInterceptor() {
}
@Pointcut("execution (* *.*(..))")
public void profile(){}
@Around("profile()")
public Object invoke(MethodInvocation mi) throws Throwable {
System.out.println("test start");
Object obj=mi.proceed();
System.out.println("test end");
return obj;
}
}