use of com.jeeagile.core.exception.AgileFrameException in project jeeagile by jeeagile.
the class AgileAbstractJob method invokeMethod.
/**
* 执行方法
*/
protected void invokeMethod(AgileQuartzJob agileQuartzJob) throws Exception {
Object bean = null;
if (!agileQuartzJob.getBeanName().contains(".")) {
bean = AgileSpringUtil.getBean(agileQuartzJob.getBeanName());
} else {
bean = Class.forName(agileQuartzJob.getBeanName()).newInstance();
}
if (bean == null) {
// 方法不存在暂停执行任务
AgileScheduleUtil.pauseJob(agileQuartzJob);
throw new AgileFrameException("任务代码《" + agileQuartzJob.getJobCode() + "》执行Bean不存在,请核实!");
}
invokeMethod(bean, agileQuartzJob);
}
Aggregations