[jboss-user] [JBoss AOP] - Re: compiling aop with jbosside

stalep do-not-reply at jboss.com
Mon Sep 11 04:20:07 EDT 2006


hi, i misunderstood your question a bit, but if you test your subclasses on the inherited method you will see that they will be intercepted even though the subclass hasnt changed. For some transformation the subclass will also change, but not always. eg:

<aop>
  |  <interceptor name="MethodInt" class="MethodInterceptor" scope="PER_CLASS"/>
  |    <bind pointcut="execution(public void $instanceof{POJO}->set*(java.lang.String))">
  |       <interceptor-ref name="MethodInt"/>
  |     </bind>
  | </aop>

public class POJO
  | {
  |    private String text;
  |    public void setText(String t) { text = t; }
  | }
  | public class SubPOJO extends POJO {
  | }

in this case SubPOJO will not be changed by aopc, but MethodInsterceptor will still catch the SubPOJO.setText call.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970676#3970676

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970676



More information about the jboss-user mailing list