[jboss-dev-forums] [EJB3 Development] - Configuring Quartz in External properties(EJBs are not injected)
Andriy Lytvynskyy
do-not-reply at jboss.com
Fri Nov 26 06:49:30 EST 2010
Andriy Lytvynskyy [http://community.jboss.org/people/andy_l] created the discussion
"Configuring Quartz in External properties(EJBs are not injected)"
To view the discussion, visit: http://community.jboss.org/message/573148#573148
--------------------------------------------------------------
Hi
I'm using EJB 3.0, and I'm using Quartz, I removed all the annotations for my MDB which implements Job interface because I want to configure Quartz (cron scheduling) out of my application:
I have quartz.properties which are in my classpath:
#===============================================================
# Configure Main Scheduler Properties
#===============================================================
org.quartz.scheduler.instanceName = QuartzScheduler
org.quartz.scheduler.instanceId = AUTO
#===============================================================
# Configure ThreadPool
#===============================================================
org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
org.quartz.threadPool.threadCount = 5
org.quartz.threadPool.threadPriority = 5
#===============================================================
# Configure JobStore
#===============================================================
org.quartz.jobStore.misfireThreshold = 60000
org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin
org.quartz.plugin.jobInitializer.fileName = dpp-quartz-job.xml
org.quartz.plugin.jobInitializer.overWriteExistingJobs = false
org.quartz.plugin.jobInitializer.failOnFileNotFound = true
I've got also dpp-quartz-job.xml which descibes my job is laced to 'conf' folder in JBoss:
<?xml version="1.0" encoding="UTF-8"?>
<quartz xmlns=" http://www.opensymphony.com/quartz/JobSchedulingData http://www.opensymphony.com/quartz/JobSchedulingData"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
overwrite-existing-jobs="true">
<job>
<job-detail>
<name>MyTask</name>
<group>Svn Update Parse Group</group>
<description></description>
<job-class>
com.avery.dpp.QuartzUtils
</job-class>
<job-data-map allows-transient-data="false">
<entry>
<key></key>
<value></value>
</entry>
</job-data-map>
</job-detail>
<trigger>
<cron>
<name>JobTrigger</name>
<group>trigger-group</group>
<job-name>Svn Update Parse</job-name>
<job-group>Svn Update Parse Group</job-group>
<!-- Fire every 2 seconds -->
<!-- <cron-expression>0/2 * * * * ?</cron-expression -->
<!-- Fire every November 11 at 11:11 AM -->
<!-- cron-expression>0 11 11 11 11 ?</cron-expression -->
<!-- Daily Every day at 18:15 PM -->
<cron-expression> 0 17 18 * * ?</cron-expression>
</cron>
</trigger>
</job>
</quartz>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/573148#573148]
Start a new discussion in EJB3 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2030]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20101126/34cd9332/attachment.html
More information about the jboss-dev-forums
mailing list