3 Replies Latest reply on Dec 9, 2007 7:11 AM by Pete Muir

    using static modifier with Seam logger

    Arbi Sookazian Master

      On pg. 254 of 2.0.0.GA ref pdf, it states the following regarding @Logger:

      "Specifies that a component field is to be injected with an instance of org.jboss.seam.log.Log"

      I noticed that in my SFSB, I may use the following code without error:

      @Logger
      private Log log;


      But if I use the same code in a Seam POJO used as an interceptor class I will get a NullPointerException (e.g. when log.info() is invoked).

      If I use the following code in a Seam POJO used as an interceptor class, there is no exception:

      @Logger
      private static Log log;


      Is this the correct behavior and what accounts for the difference?