[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-2165) private @AroundInvoke method on the superclass of a bean not invoked

jaikiran pai (JIRA) jira-events at lists.jboss.org
Tue Sep 7 04:04:52 EDT 2010


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

                 Key: EJBTHREE-2165
                 URL: https://jira.jboss.org/browse/EJBTHREE-2165
             Project: EJB 3.0
          Issue Type: Bug
          Components: interceptors
    Affects Versions: depchain-1.0.0-alpha-4, bom-eap5-1.0.0
            Reporter: jaikiran pai
            Assignee: jaikiran pai


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.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list