Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1546

currently, the inteceptor build only handle the public methods of the bean instead of all methods.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.7.0
    • Fix Version/s: 4.0
    • Component/s: ejb31
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              genspring Lin Quan Jiang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: