1 Reply Latest reply on Mar 2, 2008 4:54 PM by alesj

    problem with JBoss Seam logger

    aleroch

      HI All,

      I'm newbie with JBoss Seam and I have problem with logger in my own interceptor class. I use this POJO class for the @AroundInvoke purpose. I declared "@Logger private Log log" field for logger logic but in my interceptor method I always receive null for log instance:(

      Why I receive null ?What can be a reason of this wrong behavior ?

      Thanks,
      Alex

      import javax.interceptor.AroundInvoke;
      import javax.interceptor.InvocationContext;
      
      import org.jboss.seam.annotations.Logger;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.log.Log;
      
      @Name("loggedInInterceptor")
      public class LoggedInInterceptor {
      
       @Logger
       private Log log;
      
       @AroundInvoke
       public Object checkLoggedIn(InvocationContext invocation) throws Exception {
       // log is null here :(
       return invocation.proceed();
       }
      }