Hi Ron,
Yes, "method to be advised" was my intent. Thanks for that clarification as
that hopefully cements Joshua's understanding, at least from the weaving
perspective.
Regards,
Doug
-------------- Original message --------------
From: "Ron Bodkin" <[EMAIL PROTECTED]>
Two small caveats here: you can advise reflective calls but you need to advise
calls to java.lang.reflect.Method.invoke instead of the calls to the called
type (and you need to do some runtime work to figure out which calls match). I
also would say that whatever code has the join point (shadow) is the code to
be advised but Id agree if you said method to be advised.
Ron
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Monday, March 12, 2007 12:57 PM
To: [email protected]; [email protected]
Subject: Re: [aspectj-users] [Newbie] Difference between "call" and"execution"
pointcut types
Hi Joshua,
The difference lies in how the advised code is woven.
For the execution pointcut type, the code being advised must be woven. Meaning
the bytecode for the affected classes/methods in
com.mycompany.webservices.impl..* will need to be modified by the AspectJ
compiler from what straight javac would otherwise produce.
For the call pointcut type, the client code calling the code to be advised must
be woven. Meaning the bytecode for clients of com.mycompany.webservices.impl..*
must be woven, where again the client bytecode is modified by the AspectJ
compiler from what straight javac would otherwise produce.
Additionally, if you are trying to advise code that is called reflectively, you
will need to use an execution pointcut type and weave appropriately, as the
call pointcut type just won't detect those invocations.
Hope that helps.
Regards,
Doug
-------------- Original message --------------
From: "Joshua White" <[EMAIL PROTECTED]>
All,
What is the difference between the "call" and "execution" pointcut types? Is
there different Signature requirements for each?
When I use the following:
execution(* com.mycompany.webservices.impl..*(..) throws
java.rmi.RemoteException);
I can advise the classes without a problem. However, when I use:
call(* com.mycompany.webservices.impl..*(..) throws java.rmi.RemoteException);
The actuall call gets skipped. What's the difference between the two?
Regards,
Joshua
--- Begin Message ---
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
--- End Message ---
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users