[jboss-user] [Installation, Configuration & DEPLOYMENT] - Quartz job doesn't start when JBoss starts but starts when n

Pulrulczyk do-not-reply at jboss.com
Tue Sep 25 05:58:36 EDT 2007


Hello,

I have a problem with JBoss 4.2.0 GA when it starts. It doesn't start my job . But if I redeploy my jar file with the same files, the service and jobs start. Do you know why it doesn't take account my job when Jboss starts.

Here's my service :
<?xml version="1.0" encoding="UTF-8"?>



  

    <!--
        Wait until the DataSources  deployed. This option
	ensures correct  deployment order at JBoss startup.
	Change the 'QuartzDS' to your datasource name.
	Important!==> this is NOT the JNDI name of the datasource.
	(JNDI name for it is set in a separate xxx-service.xml file). 
     -->
    <!-- jboss.jca:service=LocalTxCM,name=QuartzDS -->
    <!--
    jboss.jca:service=DataSourceBinding,name=OracleDS 
     -->
    <!--
        Wait for the deployment of XA-DataSource (if u have one ;)
        The same as above, but for XA-compliant datasource.
	Uncomment if you need it.
    -->
    <!--
    jboss.jca:service=DataSourceBinding,name=QuartzDS-XA 
    -->
    <!--
    jboss.jca:service=XATxCM,name=QuartzDS-XA
    -->

    <!--
      JNDI name for locating Scheduler, "Quartz" is default.
    -->
  
    Quartz
  
    <!--
       Call Scheduler.start() only if requested. Most of the time this 
       should be true. In some special cases you may want to have 
       scheduler service available but not run the jobs (for example, 
       if you want to administer the jobs on a particular server, only).
       Default value is true.
    -->
    <!--
     true
     -->
    <!--
      By default a Properties file named "quartz.properties" is
      loaded from the 'current working directory'. If that fails,
      then the "quartz.properties" file located (as a resource)
      in the org/quartz package is loaded. If you wish to use a
      file other than these defaults, you must either define the
      system property 'org.quartz.properties' to point to the
      file you want or set the PropertiesFile attribute. You
      may also specify the properties directly by setting the
      Properties attribute. You must use only one of these
      methods to specify the properties.
    -->

    <!--
      Initialize the SchedulerFactory with the contents
      of the Properties file with the given name.
    -->
    <!--
    quartz.properties
    -->
    <!--
      Initialized the SchedulerFactory with the contents
      of the given Properties object.
    -->
    
    
      # Default Properties file for use by StdSchedulerFactory
      # to create a Quartz Scheduler Instance, if a different
      # properties file is not explicitly specified.
      #

      # org.quartz.scheduler.classLoadHelper.class = 
   
      org.quartz.scheduler.instanceName = DefaultQuartzScheduler
      org.quartz.scheduler.rmi.export = false
      org.quartz.scheduler.rmi.proxy = false
      org.quartz.scheduler.xaTransacted = false

      org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
      org.quartz.threadPool.threadCount = 5
      org.quartz.threadPool.threadPriority = 4
<!--
      org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreCMT
      org.quartz.jobStore.driverDelegateClass =  org.quartz.impl.jdbcjobstore.StdJDBCDelegate
      org.quartz.jobStore.dataSource = QUARTZ
      org.quartz.jobStore.nonManagedTXDataSource = QUARTZ_NO_TX
      org.quartz.jobStore.tablePrefix = QRTZ_
      org.quartz.dataSource.QUARTZ.jndiURL = java:/jdbc/QuartzDS
      org.quartz.dataSource.QUARTZ_NO_TX.jndiURL = java:/jdbc/QuartzNoTxDS
     -->
     org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore

  
     #============================================================================
     # Configure Plugins
     #============================================================================
 
     org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingTriggerHistoryPlugin
     org.quartz.plugin.triggHistory.triggerFiredMessage = Trigger {1}.{0} fired job {6}.{5} at: {4, date, HH:mm:ss MM/dd/yyyy}
     org.quartz.plugin.triggHistory.triggerCompleteMessage = Trigger {1}.{0} completed firing job {6}.{5} at {4, date, HH:mm:ss MM/dd/yyyy} with resulting trigger instruction code: {9}
 
     org.quartz.plugin.jobInitializer.class =  org.quartz.plugins.xml.JobInitializationPlugin
     #org.quartz.plugin.jobInitializer.fileName = c:/jobs.xml
     org.quartz.plugin.jobInitializer.fileName = jobs.xml
     org.quartz.plugin.jobInitializer.overWriteExistingJobs = true
     org.quartz.plugin.jobInitializer.failOnFileNotFound = false
     org.quartz.plugin.jobInitializer.useContextClassLoader = true
     org.quartz.plugin.jobInitializer.validating = false
     org.quartz.plugin.jobInitializer.validatingSchema = false
     org.quartz.plugin.jobInitializer.scanInterval = 5

    
    

  



And my job.xml :

<?xml version='1.0' encoding='utf-8'?>
<quartz xmlns="http://www.quartzscheduler.org/ns/quartz"
	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          overwrite-existing-jobs="true"> 
 

    <job-detail>
      calculatorjob
      JOB_GROUP
      <job-class>fr.CalculatorJob</job-class>
      false
      false
      false
    </job-detail>
    
      
        testTrigger
        TRIGGER_GROUP
        <job-name>calculatorjob</job-name>
        <job-group>JOB_GROUP</job-group>
        <!-- <start-time>2003-12-17 9:15:00 pm</start-time>
        <end-time>2013-12-17 9:15:00 pm</end-time> -->
        <cron-expression>0/10 * * ? * *</cron-expression> <!-- every 10 seconds... -->
      
    
  

Thank you for you help
Cédric

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088323#4088323

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088323




More information about the jboss-user mailing list