cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r378368 - /cocoon/trunk/cocoon-cron/cocoon-cron-impl/src/main/java/org/apache/cocoon/components/cron/QuartzJobScheduler.java
Date Thu, 16 Feb 2006 21:03:44 GMT
Author: antonio
Date: Thu Feb 16 13:03:43 2006
New Revision: 378368

URL: http://svn.apache.org/viewcvs?rev=378368&view=rev
Log:
Merging from 2.1.x branch: Fix for COCOON-1778. Thanks to Eric Meyer.

Modified:
    cocoon/trunk/cocoon-cron/cocoon-cron-impl/src/main/java/org/apache/cocoon/components/cron/QuartzJobScheduler.java

Modified: cocoon/trunk/cocoon-cron/cocoon-cron-impl/src/main/java/org/apache/cocoon/components/cron/QuartzJobScheduler.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-cron/cocoon-cron-impl/src/main/java/org/apache/cocoon/components/cron/QuartzJobScheduler.java?rev=378368&r1=378367&r2=378368&view=diff
==============================================================================
--- cocoon/trunk/cocoon-cron/cocoon-cron-impl/src/main/java/org/apache/cocoon/components/cron/QuartzJobScheduler.java
(original)
+++ cocoon/trunk/cocoon-cron/cocoon-cron-impl/src/main/java/org/apache/cocoon/components/cron/QuartzJobScheduler.java
Thu Feb 16 13:03:43 2006
@@ -694,21 +694,22 @@
      */
     private boolean fireJob(final String name, final Object job) {
         try {
-            if (job instanceof CronJob) {
+            if (job instanceof CronJob || job instanceof Job) {
                 JobDataMap jobDataMap = new JobDataMap();
                 jobDataMap.put(DATA_MAP_OBJECT, job);
                 initDataMap(jobDataMap, name, true, null, null);
 
                 final JobDetail detail = createJobDetail(name, jobDataMap);
 
-                TriggerFiredBundle trigger = new TriggerFiredBundle(detail, null, null, false,
null, null, null, null);
+                final Trigger trigger = new SimpleTrigger(name, DEFAULT_QUARTZ_JOB_GROUP);
+
+                TriggerFiredBundle fireBundle = new TriggerFiredBundle(detail, trigger, null,
false, null, null, null, null);
 
                 final Job executor = createJobExecutor();
-                final JobExecutionContext context = new JobExecutionContext(this.scheduler,
trigger, executor);
+                final JobExecutionContext context = new JobExecutionContext(this.scheduler,
fireBundle, executor);
 
                 this.executor.execute(new Runnable() {
                         public void run() {
-                            // ((CronJob)job).execute(name);
                             try {
                                 executor.execute(context);
                             } catch (JobExecutionException e) {



Mime
View raw message