Uploaded image for project: 'JBoss AOP'
  1. JBoss AOP
  2. JBAOP-340

Enable chain overriding for container proxies

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.5.2.GA, 2.0.0.alpha2
    • Fix Version/s: 1.5.3.GA, 2.0.0.alpha3
    • Component/s: None
    • Labels:
      None

      Description

      This is needed for EJB 3

      It's actually like this:

      class Parent

      {
      void method(){}
      }

      @Stateful
      @Clustered
      class Child extends Parent

      { // no methods - all are inherited from Parent }

      Child.method() is not intercepted when the pointcut is based on the @Clustered annotation. But it is intercepted by any interceptors with the following binding.

      <bind pointcut="execution(public * ->(..))">
      <interceptor-ref name="XYZInterceptor"/>
      </bind>

      It's seems that since the method is defined in the Parent and inherited by the Child, but the annotation is in Child, that the interceptor is not included.

      Thanks -Bill

      ----Original Message----
      From: Kabir Khan
      Sent: Thursday, January 11, 2007 9:05 AM
      To: Bill Decoste
      Subject: RE: annotations on parent class

      Hmm,

      If you have

      class Parent

      {
      void parentMethod(){}
      }

      @Stateful
      @Clustered
      class Child extends Parent
      {
      void childMethod(){}
      }

      do any of these get intercepted for you? My guess is that childMethod() would and parentMethod() doesn't. And you would like parentMethod() as well?

      Kabir

      ________________________________

      From: Bill Decoste bill.decoste@jboss.com
      Sent: 11 January 2007 16:33
      To: Kabir Khan
      Subject: RE: annotations on parent class

      Sorry, I wasn't clear. Here is the scenario. When we deploy the Child class, the @Clustered annotation is not being recognized so when calls to the SFSB Child are made, the StatefulTestInterceptor is not invoked.
      If I
      annotate Parent with @Clustered, it works properly. Just want to make sure this isn't a known issue in AOP.

      Thanks - Bill

      class Parent

      { .. }

      @Stateful

      @Clustered

      class Child extends Parent

      { . }

      ________________________________

      From: Kabir Khan
      Sent: Wednesday, January 10, 2007 4:53 PM
      To: Bill Decoste
      Subject: RE: annotations on parent class

      The "class-part" of the method expression does an exact match on if the class declaring the method has been annotated. Changing it to the following should yield the correct results:

      <bind pointcut="execution(public *
      $instanceof

      {@jboss.annotation.ejb.Clustered <mailto:$instanceof%7b@jboss.annotation.ejb.Clustered> }

      ->*(..))">

      <interceptor-ref
      name="org.jboss.ejb3.stateful.StatefulTestInterceptor"/>

      </bind>

      ________________________________

      From: Bill Decoste
      bill.decoste@jboss.com
      Sent: 10 January 2007 23:33
      To: Kabir Khan
      Subject: annotations on parent class

      Hi Kabir,

      Got an aop question for you . we've got an unannotated parent class and a sublass with a @Clustered annotation. Here's a snippet from aop.xml:

      <bind pointcut="execution(public *
      @jboss.annotation.ejb.Clustered->*(..))">

      <interceptor-ref
      name="org.jboss.ejb3.stateful.StatefulTestInterceptor"/>

      </bind>

      When the subclass is invoked, the
      StatefulTestInterceptor is
      not in the stack - all of the other interceptors work properly. The aop package is not finding the @Clustered in the subclass, so it's not adding the interceptor.

      Is this a known issue?

      Thanks

      Bill DeCoste

      JBoss, a division of Red Hat

      bill.decoste@jboss.com

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                kabirkhan Kabir Khan
                Reporter:
                kabirkhan Kabir Khan
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: