@Override @Bean public JobRegistry jobRegistry() throws Exception { return createLazyProxy(jobRegistry, JobRegistry.class); }
/** * Sets up the basic components by extracting them from the {@link BatchConfigurer configurer}, defaulting to some * sensible values as long as a unique DataSource is available. * * @throws Exception if there is a problem in the configurer */ protected void initialize() throws Exception { if (initialized) { return; } BatchConfigurer configurer = getConfigurer(context.getBeansOfType(BatchConfigurer.class).values()); jobRepository.set(configurer.getJobRepository()); jobLauncher.set(configurer.getJobLauncher()); transactionManager.set(configurer.getTransactionManager()); jobRegistry.set(new MapJobRegistry()); jobExplorer.set(configurer.getJobExplorer()); initialized = true; }
@Override protected Object createObject() throws Exception { initialize(); return reference.get(); } }
@Bean public Job testConfigurerJob() throws Exception { SimpleJobBuilder builder = jobs.jobBuilders().get("configurer").start(step1()); return builder.build(); }
@Override @Bean public JobLauncher jobLauncher() throws Exception { return createLazyProxy(jobLauncher, JobLauncher.class); }
@Override protected Object createObject() throws Exception { initialize(); return reference.get(); } }
/** * Sets up the basic components by extracting them from the {@link BatchConfigurer configurer}, defaulting to some * sensible values as long as a unique DataSource is available. * * @throws Exception if there is a problem in the configurer */ protected void initialize() throws Exception { if (initialized) { return; } BatchConfigurer configurer = getConfigurer(context.getBeansOfType(BatchConfigurer.class).values()); jobRepository.set(configurer.getJobRepository()); jobLauncher.set(configurer.getJobLauncher()); transactionManager.set(configurer.getTransactionManager()); jobRegistry.set(new MapJobRegistry()); initialized = true; }
@Override @Bean public JobExplorer jobExplorer() { return createLazyProxy(jobExplorer, JobExplorer.class); }
@Override protected Object createObject() throws Exception { initialize(); return reference.get(); } }
/** * Sets up the basic components by extracting them from the {@link BatchConfigurer configurer}, defaulting to some * sensible values as long as a unique DataSource is available. * * @throws Exception if there is a problem in the configurer */ protected void initialize() throws Exception { if (initialized) { return; } BatchConfigurer configurer = getConfigurer(context.getBeansOfType(BatchConfigurer.class).values()); jobRepository.set(configurer.getJobRepository()); jobLauncher.set(configurer.getJobLauncher()); transactionManager.set(configurer.getTransactionManager()); jobRegistry.set(new MapJobRegistry()); jobExplorer.set(configurer.getJobExplorer()); initialized = true; }
@Override @Bean public JobRepository jobRepository() throws Exception { return createLazyProxy(jobRepository, JobRepository.class); }
@Override protected Object createObject() throws Exception { initialize(); return reference.get(); } }
/** * Sets up the basic components by extracting them from the {@link BatchConfigurer configurer}, defaulting to some * sensible values as long as a unique DataSource is available. * * @throws Exception if there is a problem in the configurer */ protected void initialize() throws Exception { if (initialized) { return; } BatchConfigurer configurer = getConfigurer(context.getBeansOfType(BatchConfigurer.class).values()); jobRepository.set(configurer.getJobRepository()); jobLauncher.set(configurer.getJobLauncher()); transactionManager.set(configurer.getTransactionManager()); jobRegistry.set(new MapJobRegistry()); jobExplorer.set(configurer.getJobExplorer()); initialized = true; }
@Override @Bean public PlatformTransactionManager transactionManager() throws Exception { return createLazyProxy(transactionManager, PlatformTransactionManager.class); }
@Override @Bean public JobExplorer jobExplorer() { return createLazyProxy(jobExplorer, JobExplorer.class); }
@Override @Bean public PlatformTransactionManager transactionManager() throws Exception { return createLazyProxy(transactionManager, PlatformTransactionManager.class); }
@Override @Bean public PlatformTransactionManager transactionManager() throws Exception { return createLazyProxy(transactionManager, PlatformTransactionManager.class); }
@Override @Bean public JobRepository jobRepository() throws Exception { return createLazyProxy(jobRepository, JobRepository.class); }
@Override @Bean public JobRegistry jobRegistry() throws Exception { return createLazyProxy(jobRegistry, JobRegistry.class); }
@Override @Bean public PlatformTransactionManager transactionManager() throws Exception { return createLazyProxy(transactionManager, PlatformTransactionManager.class); }