added a warn-level log message in case a MessageListener was already configured on the listener container being used within the message-driven endpoint
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2010 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.
|
||||
@@ -37,6 +37,10 @@ public class JmsMessageDrivenEndpoint extends AbstractEndpoint implements Dispos
|
||||
public JmsMessageDrivenEndpoint(AbstractMessageListenerContainer listenerContainer, ChannelPublishingJmsMessageListener listener) {
|
||||
Assert.notNull(listenerContainer, "listener container must not be null");
|
||||
Assert.notNull(listener, "listener must not be null");
|
||||
if (logger.isWarnEnabled() && listenerContainer.getMessageListener() != null) {
|
||||
logger.warn("The provided listener container already has a MessageListener implementation, " +
|
||||
"but it will be overridden by the provided ChannelPublishingJmsMessageListener.");
|
||||
}
|
||||
listenerContainer.setMessageListener(listener);
|
||||
this.listener = listener;
|
||||
this.listenerContainer = listenerContainer;
|
||||
|
||||
Reference in New Issue
Block a user