3 Replies Latest reply on Jun 8, 2009 4:50 AM by jaikiran

    WARN message in InterceptorsFactory

    jaikiran

      I was looking at https://jira.jboss.org/jira/browse/EJBTHREE-1841 and other similar user complaints about the following WARN log message on first access to a bean:

      09:02:34,655 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
      

      Looking at the InterceptorsFactory class, which gets called as follows:

      1) Client calls bean method for first time
      2) The call is passed through AOP interceptor chain
      3) AOP starts initializing any per instance advices (InterceptorsFactory is one such advice)
      4) We issue a WARN and return a NoOpInterceptor

      From what i see in the InterceptorsFactory, its probably no longer required since the same functionality is now done through the InjectInterceptorsFactory and InterceptorRegistry.

      Any reason why we should not remove this InterceptorsFactory from ejb3-interceptors-aop.xml AOP advices?



        • 1. Re: WARN message in InterceptorsFactory
          jaikiran

           

          "jaikiran" wrote:


          Any reason why we should not remove this InterceptorsFactory from ejb3-interceptors-aop.xml AOP advices?



          Should have read EJBTHREE-1246, before asking this :) The comments there say:


          The ejb3-interceptors can run in multiple modes, two of which are AOP weaved interception (basic) and Container managed interception (direct, proxy and indirect). For EJB lifecycle callbacks to be properly handled in 'basic' mode InterceptorsFactory and InjectInterceptorsFactory are used. Both of which do nothing if used in 'container' mode and will give out a warning as such.


          In my opinion, it should not be a WARN message then. Probably a DEBUG would be right.

          • 2. Re: WARN message in InterceptorsFactory
            wolfc

            No, it really means what it says. The construct should not be used, it does nothing anyway. :-)

            So try to remove that construct from core and test for regression.

            • 3. Re: WARN message in InterceptorsFactory
              jaikiran

              Removing this from the core (ejb3-interceptors-aop.xml) and running the entire testsuite shows no regressions.