| 1 25 package org.jresearch.gossip.scheduler.listeners; 26 27 import org.jresearch.gossip.exception.SystemException; 28 import org.jresearch.gossip.log.avalon.JGossipLog; 29 import org.quartz.JobExecutionContext; 30 import org.quartz.JobExecutionException; 31 32 38 public class JobListener implements org.quartz.JobListener { 39 40 43 public String getName() { 44 return "Failed Job Listener"; 45 } 46 47 50 public void jobExecutionVetoed(JobExecutionContext ctx) { 51 } 52 53 56 public void jobToBeExecuted(JobExecutionContext ctx) { 57 } 58 59 63 public void jobWasExecuted(JobExecutionContext ctx, JobExecutionException ex) { 64 if (null != ex) { 65 try { 66 JGossipLog.getInstance().getAppLogger().error( 67 "Job was executed with errors at [" + ctx.getFireTime() 68 + " details[" + ctx.getJobDetail() + "] ", ex); 69 } catch (SystemException e) { 70 e.printStackTrace(); 71 } 72 } 73 } 74 75 } 76 | Popular Tags |