0 Replies Latest reply on Mar 27, 2009 12:32 PM by Denis H

    Quartz on Seam 2.0.2

    Denis H Newbie

      Hi all,

      My client use Seam 2.0.2 on GlassFish v2 (Derby cause it's prototype, next step MySQL).

      I'm on Seam since one month. I integrate my first part, jasperreport/jaxb...OK

      Now i work on scheduling. I like quartz (with Spring), so i want use it with Seam. I read documentation (add jar, async:quartz-dispatcher, quartz tables), but ...

      first, if i use Asynchronous annotation, something like that :

      public QuartzTriggerHandle scheduleDsi(@Expiration Date when, @IntervalDuration Long min, String name, String group) {
      ... }

      I've this error :

      java.lang.IllegalArgumentException: Group name cannot be empty.
              at org.quartz.JobDetail.setGroup(JobDetail.java:196)
              at org.quartz.JobDetail.(JobDetail.java:122)
              at org.jboss.seam.async.QuartzDispatcher.scheduleWithQuartzService(QuartzDispatcher.java:132)
              at org.jboss.seam.async.QuartzDispatcher.scheduleWithQuartzServiceAndWrapExceptions(QuartzDispatcher.java:115)
              at org.jboss.seam.async.QuartzDispatcher.scheduleInvocation(QuartzDispatcher.java:101)
              at org.jboss.seam.async.QuartzDispatcher.scheduleInvocation(QuartzDispatcher.java:44)

      Maybe from Seam 2.0.2 ? Actualy this version have many problems, and i ask to upgrade to the last version.

      My first question : this error is from Seam 2.0.2 ? or my work ?

      My second step, and question :

      I've succes when i use Quartz with my JobDetail and Trigger.
      My job fire at the right moment, but ... in my job, i have null for entityManager/renderer ( with injection @In )

      So, i can do nothing, can't send email or get datas :(
      Why ? From Job, is it possible to acces to the ApplicationContext ?
      I browse the forum but i'm ... with no idea...