* @author robh
*/
public class SpringWithJobPersistence {
public static void main(String[] args) throws Exception {
ApplicationContext ctx = new FileSystemXmlApplicationContext(
"./ch14/src/conf/quartzPersistent.xml");
// get the scheduler
Scheduler scheduler = (Scheduler) ctx.getBean("schedulerFactory");
JobDetail job = scheduler.getJobDetail("otherJob",
Scheduler.DEFAULT_GROUP);
if (job == null) {
// the job has not yet been created
job = (JobDetail) ctx.getBean("job");
job.setName("otherJob");
job.getJobDataMap().put("message", "This is another message");
Trigger trigger = new SimpleTrigger("simpleTrigger",
Scheduler.DEFAULT_GROUP, new Date(), null,