Suppose I've got the following simple wrapper around a Job's run() method:
@Aspect
public class JobWrapperAspect {
@Around("execution(void com.example.jobs.FooJob.run())")
public void retryJob(ProceedingJoinPoint join_point) throws Throwable {
System.out.println("About to run a FooJob");
join_point.proceed();
System.out.println("Done running a FooJob");
}
}
That's pretty straightforward, and works well.
But is there any way to access the job object from within my advice?
Something like...
System.out.println("About to run a " + job.toString());
join_point.proceed();
System.out.println("Done running a " + job.toString());
Any ideas? How do I access the "job" object?
Thanks!
Norman
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users