sheen022
02-24-2006, 06:48 PM
I'm using the AfterReturningAdvice for some my methods and have found it to be really useful.
There is, however, one issue I haven't been able to figure out and I was wondering if there is a workaround.
public String methodA() {
System.out.println("This is the methodA");
methodB();
}
public String methodB() {
System.out.println("This is the methodB");
}
Is it possible to have the advice invoke both methods? Since methodA is calling methodB (methodB should be invoked - after returning), and then after methodA returns - the advice to should be invoked for methodA.
I have been unable to get the advice invoke on methodB.
Please let me know if there is workaround.
Thanks - I appreciate it!
There is, however, one issue I haven't been able to figure out and I was wondering if there is a workaround.
public String methodA() {
System.out.println("This is the methodA");
methodB();
}
public String methodB() {
System.out.println("This is the methodB");
}
Is it possible to have the advice invoke both methods? Since methodA is calling methodB (methodB should be invoked - after returning), and then after methodA returns - the advice to should be invoked for methodA.
I have been unable to get the advice invoke on methodB.
Please let me know if there is workaround.
Thanks - I appreciate it!