2 Replies Latest reply on Mar 29, 2008 5:55 PM by Pete Muir

    TimerTask and JBoss Seam?

    Rocco None Newbie

      Hello friends,


      as the title indicates, I try to use Java TimerTask for job scheduling. Quartz seems to be a little bit overweighted for my purpose. When I start a simple TimerTask as seen below


      ...
      public class MyTask extends TimerTask {
           
           public MyTask() {}
           
           @Logger
           private Log log;
           
           @Override
           public void run() {
                
               log.info(TEST LOG);


           }
      ...


      I get a NullPointerException, because the Log cannot be found. I guess the TimerTask is running outside of the bean container or something. How can I use Seam Pojos in TimerTask? How can I pull the TimerTask into the container so that I can use seam?
      thx for reading