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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.7.0
    • 4.0
    • ejb31
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: