Is it possible to get/set thread name from joinPoint?
@Around("call(void methodA())")
public Object conditionB(ProceedingJoinPoint joinPoint) throws Throwable
{
Object res = joinPoint.proceed();
System.out.println(Thread.currentThread().getName());
return res;
}
Thread.currentThread().getName() get name of thread main from AspectJ class. Is it possible to get (probably from joinPoit) name of thread which executes methodA?
Actually
Thread.currentThread().getName()works fine. It is name set in methodA. Just be careful with the same thread-names.