Package org.springframework.scheduling.quartz

Examples of org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean


        final ClassMethodNamesPair jobDetails = CronMethodParser.findTargetMethodDetails(scheduledJobDetail.getJobName());
        if (jobDetails == null) { throw new IllegalArgumentException(
                "Code has no @CronTarget with this job name (@see JobName); seems like DB/code are not in line: "
                        + scheduledJobDetail.getJobName()); }
        final Object targetObject = getBeanObject(Class.forName(jobDetails.className));
        final MethodInvokingJobDetailFactoryBean jobDetailFactoryBean = new MethodInvokingJobDetailFactoryBean();
        jobDetailFactoryBean.setName(scheduledJobDetail.getJobName() + "JobDetail" + tenant.getId());
        jobDetailFactoryBean.setTargetObject(targetObject);
        jobDetailFactoryBean.setTargetMethod(jobDetails.methodName);
        jobDetailFactoryBean.setGroup(scheduledJobDetail.getGroupName());
        jobDetailFactoryBean.setConcurrent(false);
        jobDetailFactoryBean.afterPropertiesSet();
        return jobDetailFactoryBean.getObject();
    }
View Full Code Here

TOP

Related Classes of org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.