INT-3017 Redis TaskExecutor Changes

Don't wrap the TE in an EHTE if there is no BeanFactory.
This commit is contained in:
Gary Russell
2013-11-05 18:34:16 -05:00
parent 4cf0e2e673
commit f169555224

View File

@@ -156,7 +156,7 @@ public class RedisQueueMessageDrivenEndpoint extends MessageProducerSupport impl
String beanName = this.getComponentName();
this.taskExecutor = new SimpleAsyncTaskExecutor((beanName == null ? "" : beanName + "-") + this.getComponentType());
}
if (!(this.taskExecutor instanceof ErrorHandlingTaskExecutor)) {
if (!(this.taskExecutor instanceof ErrorHandlingTaskExecutor) && this.getBeanFactory() != null) {
MessagePublishingErrorHandler errorHandler =
new MessagePublishingErrorHandler(new BeanFactoryChannelResolver(this.getBeanFactory()));
errorHandler.setDefaultErrorChannel(this.errorChannel);