cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/cron/java/org/apache/cocoon/components/cron QuartzJobExecutor.java
Date Thu, 04 Sep 2003 16:04:10 GMT
giacomo     2003/09/04 09:04:10

  Modified:    src/blocks/cron/java/org/apache/cocoon/components/cron
                        QuartzJobExecutor.java
  Log:
  added management functionallity
  
  Revision  Changes    Path
  1.3       +10 -6     cocoon-2.1/src/blocks/cron/java/org/apache/cocoon/components/cron/QuartzJobExecutor.java
  
  Index: QuartzJobExecutor.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/cron/java/org/apache/cocoon/components/cron/QuartzJobExecutor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -d -b -u -r1.2 -r1.3
  --- QuartzJobExecutor.java	4 Sep 2003 09:03:39 -0000	1.2
  +++ QuartzJobExecutor.java	4 Sep 2003 16:04:10 -0000	1.3
  @@ -66,12 +66,13 @@
    *
    * @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
    * @version CVS $Id$
  + *
    * @since 2.1.1
    */
   public class QuartzJobExecutor
  -    implements Job {
  +implements Job {
       /** Map key for the run status */
  -    private static final String DATA_MAP_KEY_ISRUNNING = "QuartzJobExecutor.isRunning";
  +    static final String DATA_MAP_KEY_ISRUNNING = "QuartzJobExecutor.isRunning";
   
       /* (non-Javadoc)
        * @see org.quartz.Job#execute(org.quartz.JobExecutionContext)
  @@ -79,12 +80,14 @@
       public void execute(final JobExecutionContext context)
           throws JobExecutionException {
           final JobDataMap data = context.getJobDetail().getJobDataMap();
  +        data.put(QuartzJobScheduler.DATA_MAP_JOB_EXECUTION_CONTEXT, context);
  +
           final Logger logger = (Logger)data.get(QuartzJobScheduler.DATA_MAP_LOGGER);
           final String name = (String)data.get(QuartzJobScheduler.DATA_MAP_NAME);
           final Boolean canRunConcurrentlyB = ((Boolean)data.get(QuartzJobScheduler.DATA_MAP_RUN_CONCURRENT));
  -        final boolean canRunConcurrently = (canRunConcurrentlyB == null ? true : canRunConcurrentlyB.booleanValue());
  +        final boolean canRunConcurrently = ((canRunConcurrentlyB == null) ? true : canRunConcurrentlyB.booleanValue());
   
  -        if ( !canRunConcurrently) {
  +        if (!canRunConcurrently) {
               Boolean isRunning = (Boolean)data.get(DATA_MAP_KEY_ISRUNNING);
   
               if ((null != isRunning) && isRunning.booleanValue()) {
  @@ -120,6 +123,7 @@
               }
   
               data.put(DATA_MAP_KEY_ISRUNNING, new Boolean(true));
  +
               if (job instanceof Job) {
                   ((Job)job).execute(context);
               } else if (job instanceof CronJob) {
  
  
  

Mime
View raw message