Dashboard > Quartz 1 > ... > Documentation > BestPractices
  Quartz 1 Log In View a printable version of the current page.  
  BestPractices
Added by James House, last edited by James House on Jul 13, 2005
Labels: 
(None)

The following suggestions are considered the 'best practices' for using various aspects of Quartz.


JobDataMap Tips

The JobDataMap that is found on the JobExecutionContext during Job execution serves as a convenience. It is a merge of the JobDataMap found on the JobDetail and the one found on the Trigger, with the value in the latter overriding any same-named values in the former.

Storing JobDataMap values on a Trigger can be useful in the case where you have a Job that is stored in the scheduler for regular/repeated use by multiple Triggers, yet with each independent triggering, you want to supply the Job with different data inputs.

In light of all of the above, we recommend as a best practice the following: Code within the Job.execute(..) method should generally retrieve values from the JobDataMap on found on the JobExecutionContext, rather than directly from the one on the JobDetail.

The last best practice is code that is only in CVS currently.

Posted by Chris Widhelm at Jul 14, 2005 09:05 | Permalink
Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators