0 Replies Latest reply on Nov 6, 2008 6:09 AM by superDev superDev

    Quartz in enterprise application

    superDev superDev Newbie

      I have an EAR app with an EJB module and a web module, job MyAppQuartzJob and trigger classes are defined in ear/lib dir, EJB and web modules put ear/lib into their class path.
      Quartz is started up in servlet container as listener configured in web.xml

      <listener-class>org.quartz.ee.servlet.QuartzInitializerListener</listener-class>


      EJB bean (message driven bean), gets the Quartz scheduler and schedul the MyAppQuartzJob job with:

      Scheduler sched = SchedulerRepository.getInstance().lookup("myAppQuartzSchedulerName");
      ...
      job = new JobDetail(jobName, null, MyAppQuartzJob.class);
      sched.addJob(job, true);
      ...
      sched.scheduleJob(trigger);


      I run the application several times and it worked. My question is can I run into some problems? For example, quartz user thread problem? I'm not sure whether jobs are run in EJB context or web servelet context.

      Tanks a lot in advance!