1 Reply Latest reply on May 9, 2013 11:14 PM by jaikiran pai

    javax.ejb.Schedule repeat same execution after restart

    Sérgio Abreu Newbie

      Hi,

       

      I'm using jboss AS 6.1, EJB 3.1, and create scheduer like this:

       

      @Stateless

      public class Sched implements Serializable, SchedLocal {

       

       

                private static final long serialVersionUID = 1L;

       

                @PersistenceContext

                private EntityManager manager;

       

       

                @SuppressWarnings("unchecked")

                @Schedule(minute = "*/1", hour="*", persistent=true)

                public void counter() {

                               System.out.println("-------> Scheduler iniciado." + new Date());

        }

       

      When I start the jboss with a clean cache, the scheduler executes normally, however when I stop de jboss and start again the scheduler repeat de same execution every time. Below is how it appears in the log:

       

       

      18:03:00,219 INFO  [STDOUT] -------> Scheduler iniciado.Thu May 09 18:03:00 BRT 2013

      18:03:00,223 INFO  [STDOUT] -------> Scheduler iniciado.Thu May 09 18:03:00 BRT 2013

      18:03:00,223 INFO  [STDOUT] -------> Scheduler iniciado.Thu May 09 18:03:00 BRT 2013

      18:03:00,224 INFO  [STDOUT] -------> Scheduler iniciado.Thu May 09 18:03:00 BRT 2013

      18:03:00,224 INFO  [STDOUT] -------> Scheduler iniciado.Thu May 09 18:03:00 BRT 2013

      18:03:00,224 INFO  [STDOUT] -------> Scheduler iniciado.Thu May 09 18:03:00 BRT 2013

      18:03:00,224 INFO  [STDOUT] -------> Scheduler iniciado.Thu May 09 18:03:00 BRT 2013

      18:03:00,224 INFO  [STDOUT] -------> Scheduler iniciado.Thu May 09 18:03:00 BRT 2013

      18:03:00,224 INFO  [STDOUT] -------> Scheduler iniciado.Thu May 09 18:03:00 BRT 2013

      18:03:00,225 INFO  [STDOUT] -------> Scheduler iniciado.Thu May 09 18:03:00 BRT 2013

       

      I check the deploy folder and there is no duplicated packages, when i delete the folders: data, tmp, work, it executes normally. Why this happens?