Hi, With the "old" API interceptors get appended to everything on the object. In this case you would need to do some filtering in the aspect. e.g.
| Object invoke(Invocation inv) throws Throwable | { | if (inv instanceof FieldInvocation){ | //Do work | } | return inv.invokeNext(); | } | With the "new" weaving in AOP 2, you can be more selective about what you attach. | AdviceBinding binding2 = new AdviceBinding("get(* org.jboss.test.aop.dynamicgenadvisor.POJO->i)", null); | String name2 = binding2.getName(); | binding2.addInterceptor(MyInterceptor.class); | | Advised advised = ((Advised)obj); | InstanceAdvisor advisor = advised._getInstanceAdvisor(); | advisor.getDomain().addBinding(binding2); | This code exists in head and will be released as an alpha in the not-too-distant future. The "old" API is still supported in AOP 2, but will probably be deprecated in the future, maybe in AOP 3? BTW I want to make AOP 2 use JBoss 5 and use JBoss Retro to be able to support JDK 1.4. This means that the annotation compiler will be retired. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956523#3956523 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956523 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user