[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] After Throwing advice called several times wh en only expecting on ce.
|
OK, I actually think I may know why this was happening. My advice was in a
abstract Aspect, and all my other Aspects were applying the advice to the
same code.
Should this be the way it works? I would think that if you override the
advice in each aspect, then yes, it would apply each time.
AR.
-----Original Message-----
From: Rustad, Aaron
Sent: October 19, 2003 9:03 AM
To: 'aspectj-users@xxxxxxxxxxx'
Subject: [aspectj-users] After Throwing advice called several times when
only expecting on ce.
Hello everyone. I am new to the whole AOP scene and I am hoping one of you
can help solve this problem for me.
I have some code that picks out an after throwing joinpoint, but when it
executes and I look at the logging statements, I see that it seems to
execute 4 times. The aspect looks like this:
after() throwing(CreateEnvelopeException e):
within(com.blah.edi..*) &&
call(* com.blah.edi..*(..)) {
Logger logger = getLogger(thisJoinPoint.getThis());
if (logger.isInfoEnabled()) {
logger.info(thisJoinPointStaticPart.getSourceLocation());
logger.info(e.getMessage(), e);
}
}
The joinpoint looks like this:
throw new CreateEnvelopeException("Envelope version '" + version +
"' is not supported.");
I am using Version 1.1.1 and JDK 1.4.2.
Thanks for your help!
Aaron.
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users