SPR-6240 Added namespace support for ErrorHandler strategy on JMS "listener-container" elements.

This commit is contained in:
Mark Fisher
2009-10-28 14:36:01 +00:00
parent 0e85c66f2f
commit 0400b68afb
4 changed files with 52 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,6 +42,8 @@ class JmsListenerContainerParser extends AbstractListenerContainerParser {
private static final String TASK_EXECUTOR_ATTRIBUTE = "task-executor";
private static final String ERROR_HANDLER_ATTRIBUTE = "error-handler";
private static final String CACHE_ATTRIBUTE = "cache";
@@ -93,6 +95,12 @@ class JmsListenerContainerParser extends AbstractListenerContainerParser {
new RuntimeBeanReference(taskExecutorBeanName));
}
String errorHandlerBeanName = containerEle.getAttribute(ERROR_HANDLER_ATTRIBUTE);
if (StringUtils.hasText(errorHandlerBeanName)) {
containerDef.getPropertyValues().addPropertyValue("errorHandler",
new RuntimeBeanReference(errorHandlerBeanName));
}
String destinationResolverBeanName = containerEle.getAttribute(DESTINATION_RESOLVER_ATTRIBUTE);
if (StringUtils.hasText(destinationResolverBeanName)) {
containerDef.getPropertyValues().addPropertyValue("destinationResolver",