This content has been marked as final.
Show 3 replies
-
1. Re: pointcut $instanceof didn't work
kabirkhan Sep 2, 2005 8:10 AM (in response to sharman)There should be no difference between Exceptions and normal classes, neither with regard to $instanceof{} nor call/execution usage
-
2. Re: pointcut $instanceof didn't work
sharman Sep 2, 2005 2:01 PM (in response to sharman)Thanx Kabir for the reply.
Yeah, I understand that there should be no difference between Exceptions and normal classes. But $instanceof{} somehow doesn't work on system class(like java.lang.Exception). It is working fine for me with normal classes. Can u please try this pointcut and see if the interceptor is called.<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <aop> <aspect class="com.ac.detector.ExceptionHandlingAspect" scope="PER_INSTANCE"/> <bind pointcut="call(* $instanceof{java.lang.Exception}->*(..))"> <advice aspect="com.ac.detector.ExceptionHandlingAspect" name="catchException"/> </bind> </aop>
Thanx,
NS -
3. Re: pointcut $instanceof didn't work
kabirkhan Sep 5, 2005 5:33 AM (in response to sharman)Create a minimal example showing everything, and I'll try to take a look