if (!JobRegistryBackgroundJobRunner.getErrors().isEmpty()) {
throw JobRegistryBackgroundJobRunner.getErrors().get(0);
}
if (launcher == null) {
MBeanServerConnectionFactoryBean connectionFactory = new MBeanServerConnectionFactoryBean();
try {
launcher = (JobOperator) getMBean(connectionFactory, "spring:service=batch,bean=jobOperator",
JobOperator.class);
loader = (JobLoader) getMBean(connectionFactory, "spring:service=batch,bean=jobLoader", JobLoader.class);