Hello all I like to use aspectJ with my application, now I put the aspectjrt.jar into my server -> all -> lib directory
And the application is loaded with no exception but when I execute the class 's I don’t get any aspectJ prints ( I used system.out.println with the
@Around annotation) .
Wheni test this with simple class outside the jobss it working great
Do I need to know something else when using aspectJ with jboss ?
this is the code :
code:
@Pointcut("call(* com.aop..*(..) )")
void callBeforeAndAfterMethod(){}
@Around( "callBeforeAndAfterMethod()" )
public Object aroundTrace( ProceedingJoinPoint jp ) throws Throwable {
String methodName = jp.getSignature().getName();
System.out.println("Method name : " + methodName);
System.out.println("Before code processed....");
Object ret = jp.proceed();
System.out.println("After code processed....");
return ret;
}