Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-2165

private @AroundInvoke method on the superclass of a bean not invoked

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • depchain-1.0.0-alpha-17
    • bom-eap5-1.0.0, depchain-1.0.0-alpha-4
    • interceptors
    • None
    • jboss-ejb3-interceptors:1.0.8

      Consider this bean and its superclass:

      public class BaseBean
      {
      @AroundInvoke
      private Object aroundInvoke(InvocationContext inv) throws Exception

      { System.out.println("In aroundInvoke of base bean"); }

      ...
      }

      @Stateless
      public class BeanA extends BaseBean
      {

      @AroundInvoke
      private Object aroundInvoke(InvocationContext inv) throws Exception

      { System.out.println("In aroundInvoke of BeanA"); }

      }

      When a business method of BeanA is invoked, the aroundInvoke method on the BaseBean is not being called. Only the around invoke method on the BeanA gets called. This goes against the spec (Section "Multiple Method Interceptor Methods" of the interceptors spec).

      The bug lies in org.jboss.ejb3.interceptors.lang.ClassHelper.isOverridden(Method method, Method... methods) which doesn't take into account private method.

              jaikiran Jaikiran Pai (Inactive)
              jaikiran Jaikiran Pai (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: