I've revisited how bindings for inherited methods work http://jira.jboss.com/jira/browse/JBAOP-154, to be more similar to how overridden methods work.
class POJO{ void test(); void test2(); } class Sub1 extends POJO{ } class Sub2 extends POJO{ void test(); void test2(); } <aop> <bind pointcut="execution(* POJO->*())"> <interceptor class="A"/> </bind> <bind pointcut="execution(* Sub*->test())"> <interceptor class="B"/> </bind> <aop> POJO pojo = new POJO(); pojo.test(); //Gets intercepted by A Sub1 sub1 = new Sub1(); sub1.test(); //Gets intercepted by B Sub2 sub2 = new Sub2(); sub2.test(); //Gets intercepted by B
<bind pointcut="execution(* Sub*->*())"> <interceptor class="C"/> </bind>
<bind pointcut="execution(* Sub*->*())"> <interceptor class="C"/> </bind>
<bind pointcut="execution(* Sub*->test2())"> <interceptor class="C"/> </bind>