3 Replies Latest reply on Sep 19, 2007 4:30 PM by Gerhard Balthasar

    how to terminate @Asynchronous method

    Tomislav Jakopec Novice

      I have @Asynchronous method and everithing is working fine. Now I want to stop calling that method.

      @AutoCreate
      @Name("natjecajServis")
      @Stateless
      public class NatjecajServisBean implements NatjecajIServis {
      @Asynchronous
       public void odradi(@Expiration
       Date date, @IntervalCron
       Long interval,@FinalExpiration Date kraj) {
      ...
      }
      }
      


      witch is call from another bena when server starts
      @Stateless
      @Name("cron")
      public class CronBean implements Cron {
      @In
      ZaposlenikIServis zaposlenikServis;
      @Observer("org.jboss.seam.postInitialization")
      public void postaviIzvodenje() {
       log.info("Set up cron");
      zaposlenikServis.odradi(...);
      }
      }
      



      So, how to stop calling @Asynchronous method