1 Reply Latest reply on Mar 11, 2010 7:56 AM by jaikiran pai

    [JBoss 6.0 M2 / EJB 3.1] The method createCalendarTimer(ScheduleExpression) is undefined for the type TimerService

    Celinio Fernandes Novice


      I know the Timer feature of EJB 3.1 is not implemented yet in JBoss 6.0 M2 but i am just wondering how come the createCalendarTimer(SchedulerExpression) method is not recognized yet.

      That method is part of the TimerService interface that comes with EJB 3.1


      Is this normal ? Am i missing something ?


      import javax.annotation.Resource;    
      import javax.annotation.PostConstruct;
      import javax.ejb.ScheduleExpression;
      import javax.ejb.Stateless;
      import javax.ejb.Timer;
      import javax.ejb.TimerService;
      import javax.inject.Inject;
      import com.eni.dvtejb31.ejb.entitybeans.Contact;
      public class SessionBeanSchedulerExpr {
           TimerService timerService; 
          public void init() {   
              ScheduleExpression expr = new ScheduleExpression().dayOfWeek("1,5").hour(10).minute(0);;
              Timer timer = timerService.createCalendarTimer(expr);  // method not recognized during compilation