7 Replies Latest reply on Nov 21, 2011 11:51 AM by Radim Hanus

    JBoss AS 7.0.0.Final And EJB 3.1 @Schedule Problem

    Paata Lominadze Newbie

      Hi all,

      I'm trying to test simple example about timer service.

       

      1.Application Server :

      7.0.0.FinalLightningWeb Profile Only (Java EE6 Certified)

       

       

      2. Here is Code Example

       

      @Singleton
      @Startup
      @LocalBean
      public class SMSSender {
      
          @PostConstruct
          @Schedules({ @Schedule(hour = "*", minute = "*", second = "*/5"),
                  @Schedule(hour = "*", minute = "*", second = "*/10") })
          public void myStart() {
              System.out.println("Start ....................");
              System.out.println(getClass().getName() + ": " + new Date());
              System.out.println("Finished ....................");
          }
      }
      

       

      But output printed only once :

       

       

      17:20:48,639 INFO  [stdout] (MSC service thread 1-5) Start ....................
      17:20:48,640 INFO  [stdout] (MSC service thread 1-5) com.info.billing.sms.messages.beans.sessoin.SMSSender: Sun Jul 24 17:20:48 GET 2011
      17:20:48,640 INFO  [stdout] (MSC service thread 1-5) Finished ....................
      

       

       

      Did I miss something or EJB 3.1 Features is not implemented on JBoss AS 7.0.0.Final yet ?

       

       

      _____________________

      Regards,

      Paata Lominadze.

      Magticom LTD.