<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Configuring Quartz in External properties(EJBs are not injected)
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/andy_l">Andriy Lytvynskyy</a> in <i>EJB3 Development</i> - <a href="http://community.jboss.org/message/573148#573148">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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:</p><p>I have quartz.properties which are in my classpath:</p><p>#===============================================================</p><p># Configure Main Scheduler Properties</p><p>#===============================================================</p><p>org.quartz.scheduler.instanceName = QuartzScheduler<br/>org.quartz.scheduler.instanceId = AUTO</p><p>#===============================================================</p><p># Configure ThreadPool<br/>#===============================================================</p><p>org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool<br/>org.quartz.threadPool.threadCount = 5<br/>org.quartz.threadPool.threadPriority = 5</p><p>#===============================================================</p><p># Configure JobStore</p><p>#===============================================================</p><p>org.quartz.jobStore.misfireThreshold = 60000<br/>org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore<br/>org.quartz.plugin.jobInitializer.class = org.quartz.plugins.xml.JobInitializationPlugin<br/>org.quartz.plugin.jobInitializer.fileName = dpp-quartz-job.xml<br/>org.quartz.plugin.jobInitializer.overWriteExistingJobs = false<br/>org.quartz.plugin.jobInitializer.failOnFileNotFound = true</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I've got also dpp-quartz-job.xml which descibes my job is laced to 'conf' folder in JBoss:</p><p><?xml version="1.0" encoding="UTF-8"?></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span><quartz xmlns="</span><a class="jive-link-external-small" href="http://www.opensymphony.com/quartz/JobSchedulingData" target="_blank">http://www.opensymphony.com/quartz/JobSchedulingData</a><span>"</span><br/><span>xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"</span><br/>overwrite-existing-jobs="true"><br/>    <job><br/>        <job-detail><br/>            <name>MyTask</name><br/>            <group>Svn Update Parse Group</group><br/>            <description></description><br/>            <job-class><br/>                com.avery.dpp.QuartzUtils<br/>            </job-class><br/>            <job-data-map allows-transient-data="false"><br/>                <entry><br/>                    <key></key><br/>                    <value></value><br/>                </entry><br/>            </job-data-map><br/>        </job-detail><br/>        <trigger><br/>            <cron><br/>                <name>JobTrigger</name><br/>                <group>trigger-group</group><br/>                <job-name>Svn Update Parse</job-name><br/>                <job-group>Svn Update Parse Group</job-group><br/>                 <!-- Fire every 2 seconds --><br/>                <!-- <cron-expression>0/2 * * * * ?</cron-expression --></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>                <!-- Fire every November 11 at 11:11 AM --><br/>                <!-- cron-expression>0 11 11 11 11 ?</cron-expression --></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>                <!-- Daily Every day at 18:15 PM --><br/>                <cron-expression> 0 17 18 * * ?</cron-expression><br/>            </cron><br/>        </trigger><br/>    </job><br/></quartz></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/573148#573148">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB3 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2030">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>