You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Shawn Jiang (JIRA)" <ji...@apache.org> on 2011/05/09 16:00:03 UTC

[jira] [Updated] (OPENEJB-1546) currently, the inteceptor build only handle the public methods of the bean instead of all methods.

     [ https://issues.apache.org/jira/browse/OPENEJB-1546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shawn Jiang updated OPENEJB-1546:
---------------------------------

    Attachment: 0008-getMethods-will-only-handle-the-public-method-of-the.patch

use the new logic to handle interceptors of all methods in the bean class.

> currently,  the inteceptor build only handle the public methods of the bean instead of all methods.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1546
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1546
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: ejb31
>    Affects Versions: (trunk/openejb3)
>            Reporter: Shawn Jiang
>         Attachments: 0008-getMethods-will-only-handle-the-public-method-of-the.patch
>
>
> In org.apache.openejb.assembler.classic.InterceptorBindingBuilder.build(BeanContext, EnterpriseBeanInfo), following logic is used to find interceptors of all methods of bean class.
> for (Method method : beanContext.getBeanClass().getMethods()) {
> -            List<InterceptorData> methodInterceptors = createInterceptorDatas(method, beanInfo.ejbName, this.bindings);
> -
> -            // The bean itself gets to intercept too and is always last.
> -            methodInterceptors.add(beanAsInterceptor);
> -
> -            beanContext.setMethodInterceptors(method, methodInterceptors);
> }
> But because Class.getMethods() can only return public methods,  we missed all private/protected methods here.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira