0 Replies Latest reply on Aug 8, 2012 11:19 PM by D. Alvarado

    How do I setup my Quartz job to run within an EAR file?

    D. Alvarado Newbie

      Hi,

       

       

      I'm using JBoss 4.2.3 (insert jokes here) and trying to deploy an EAR containing only a single JAR file.  The JAR file contains an annotated class with a Quartz job I want to run.  But the Quartz job isn't running, so I figure not setting it up properly.  The EAR file is structured like so

       

       

      [code]

      EAR file

                META-INF/application.xml

                META-INF/jboss-app.xml

                lib

                          myclient-1.0-SNAPSHOT.jar

                          ... other libs ...

                log4j.properties

      [/code]

       

       

      Here's my application.xml file ...

       

       

      [code]

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE application PUBLIC

              "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"

              "http://java.sun.com/dtd/application_1_3.dtd">

      <application>

        <display-name>Orders</display-name>

        <description>Runs periodic jobs to process DIDO orders.</description>

        <module>

          <java>lib/myclient-1.0-SNAPSHOT.jar</java>

        </module>

      </application>

      [/code]

       

       

      and here's my class, located in the lib/myclient-1.0-SNAPSHOT.jar file ...

       

       

      [code]

      @MessageDriven(activationConfig = {@ActivationConfigProperty(propertyName = "cronTrigger", propertyValue = "0 5,10,15,20,25,30,35,40,45,50,55 * * * ?")})

      @ResourceAdapter("quartz-ra.rar")

      public class ProcessOrdersJob extends AbstractServiceProvider implements Job {

       

       

                public void execute(JobExecutionContext arg0) throws JobExecutionException {

                          System.out.println("ProcessOrdersJob started executing.");

                          LOG.info("Started proces orders job at "

                                              + (new java.util.Date()).toString());

      [/code]

       

       

      Any ideas what's going wrong?  I missed the beach volleyball final trying to figure this out! - Dave