title: EJB @Timeout not working
body: <p>I want to wake up ejb timer on every two second. For that I am creating <strong>ScheulerExpression</strong> as the code below...</p>
  
  <pre><code>package com.fks.nclp.ejb.timer.service;
  
  import javax.annotation.PostConstruct;
  import javax.annotation.Resource;
  import javax.ejb.LocalBean;
  import javax.ejb.ScheduleExpression;
  import javax.ejb.Startup;
  import javax.ejb.Timeout;
  import javax.ejb.TimerConfig;
  import javax.ejb.TimerService;
  
  import com.sun.jersey.spi.resource.Singleton;
  
  
  @LocalBean
  @Singleton
  @Startup
  public class HelloWorldService {
  
  
      @Resource
      TimerService timerService;
  
      @PostConstruct
      public void initialize(){
              System.out.println("EJB PRE CONSTRUCT");
              ScheduleExpression expression = new ScheduleExpression();
  
              //SET TIMER TO 2 SEC            
              expression.hour("*");
              expression.minute("*");
              expression.second("*/2");
  
              timerService.createCalendarTimer(expression,new TimerConfig("TimerScheduler",false));
  
  
      }
  
  
      @Timeout
      public void startTimer(){
          System.out.println("THIS IS EJB TIMER PROGRAM");
      }
  
  }
  </code></pre>
  
  <p>But ... the EJB container is not waking up the scheduler after every two second.</p>
  
  <p>Any Suggestion on this ?
  How can I make the expression to wake up every two second.</p>
  
  <p>Thanks,
  Gunjan.</p>