2 Replies Latest reply on Jan 25, 2008 8:49 AM by baspet

    raiseTimedEvent on ear with multiple wars

    baspet

      Hi,

      i have an ear application containing one ejb and two war modules.

      i wrote a bootstap class in order to start some scheduling:

      @Name("bootstrap")
      @Scope(ScopeType.APPLICATION)
      @Startup
      public class Bootstrap {
       @In EntityManager entityManager;
      
       @Create
       public void start() throws Exception {
       Events.instance().raiseTimedEvent("activationEvent", new CronSchedule((Long) null, "0 0/1 * * * ?"));
       }
      
       @Destroy
       public void stop() {
       }
      
      }
      


      The problem is that when server starts, method start() is been calling twice (once per war module), causing the same scheduler to fire twice.

      Thanks
      V.