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

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2217 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Mark Fisher
2009-10-28 14:36:01 +00:00
parent acc5cc246a
commit 9ca67d67a3
4 changed files with 52 additions and 5 deletions
@@ -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",