List of usage examples for org.springframework.integration.context IntegrationProperties TASK_SCHEDULER_POOL_SIZE
String TASK_SCHEDULER_POOL_SIZE
To view the source code for org.springframework.integration.context IntegrationProperties TASK_SCHEDULER_POOL_SIZE.
Click Source Link
From source file:org.springframework.integration.config.DefaultConfiguringBeanFactoryPostProcessor.java
/** * Register a TaskScheduler in the given BeanDefinitionRegistry. */// w w w . ja va2 s .c om private void registerTaskScheduler(BeanDefinitionRegistry registry) { if (this.logger.isInfoEnabled()) { this.logger.info("No bean named '" + IntegrationContextUtils.TASK_SCHEDULER_BEAN_NAME + "' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created."); } BeanDefinition scheduler = BeanDefinitionBuilder.genericBeanDefinition(ThreadPoolTaskScheduler.class) .addPropertyValue("poolSize", IntegrationProperties.getExpressionFor(IntegrationProperties.TASK_SCHEDULER_POOL_SIZE)) .addPropertyValue("threadNamePrefix", "task-scheduler-") .addPropertyValue("rejectedExecutionHandler", new CallerRunsPolicy()) .addPropertyValue("errorHandler", new RootBeanDefinition(MessagePublishingErrorHandler.class)) .getBeanDefinition(); registry.registerBeanDefinition(IntegrationContextUtils.TASK_SCHEDULER_BEAN_NAME, scheduler); }