This content has been marked as final.
Show 3 replies
-
1. Re: $instanceof not instrumenting as expected
kabirkhan Aug 8, 2005 5:44 AM (in response to twundke)I modified the instanceof tutorial as follows and that works
public interface SomeInterface { void someMethod(); } public interface Intermediate extends SomeInterface { } public class POJO implements Intermediate { public int x; public void someMethod() { System.out.println("someMethod"); } } <?xml version="1.0" encoding="UTF-8"?> <aop> <bind pointcut="execution(void $instanceof{SomeInterface}->someMethod())"> <interceptor class="SimpleInterceptor"/> </bind> <bind pointcut="field(* $instanceof{SomeInterface}->x)"> <interceptor class="SimpleInterceptor"/> </bind> </aop>
If I have missed something let me know. Maybe include a bit more information about what you have in your classes -
2. Re: $instanceof not instrumenting as expected
twundke Aug 9, 2005 10:04 PM (in response to twundke)Kabir,
The problem is that I'm using JBossCache, which simply requires that the classes are prepared, rather than assigning a specific interceptor myself. So perhaps this is a problem only with the prepare binding?
Tim. -
3. Re: $instanceof not instrumenting as expected
ben.wang Aug 10, 2005 8:10 PM (in response to twundke)Tim,
I have just tried it using aopc with your example. It works for me. I can see the impl class has been "aspectized", although I don't actually run the example.
-Ben