1 25 26 package net.killingar.quartz; 27 28 import org.quartz.Job; 29 import org.quartz.JobExecutionContext; 30 import org.quartz.JobExecutionException; 31 import webwork.action.ActionContext; 32 import webwork.dispatcher.GenericDispatcher; 33 34 39 40 public class WebworkJob implements Job 41 { 42 public void execute(JobExecutionContext context) throws JobExecutionException 43 { 44 try 45 { 46 ActionContext.setParameters(context.getJobDetail().getJobDataMap()); 47 GenericDispatcher dispatcher = new GenericDispatcher(context.getJobDetail().getName()); 48 dispatcher.prepareValueStack(); 49 dispatcher.executeAction(); 50 dispatcher.finish(); 51 dispatcher.finalizeContext(); 52 } 53 catch (Exception e) 54 { 55 throw new JobExecutionException(e); 56 } 57 } 58 } 59 | Popular Tags |