INT-1903 more polishing

This commit is contained in:
Oleg Zhurakousky
2011-05-14 12:13:42 -04:00
parent 3e44b500fb
commit 052d3af0b5
2 changed files with 3 additions and 3 deletions

View File

@@ -50,14 +50,14 @@ public class IntegrationContextRefreshListener implements ApplicationListener<Co
IdGenerator idGenerationStrategy =
event.getApplicationContext().getBean(IdGenerator.class);
if (logger.isDebugEnabled()) {
logger.debug("Using MessageHeaders.MessageIdGenerationStrategy [" + idGenerationStrategy + "]");
logger.debug("Using MessageHeaders.IdGenerator [" + idGenerationStrategy + "]");
}
MessageHeaders.setMessageIdGenerationStrategy(idGenerationStrategy);
}
catch (NoSuchBeanDefinitionException ex) {
// We need to use the default.
if (logger.isDebugEnabled()) {
logger.debug("Unable to locate MessageHeaders.MessageIdGenerationStrategy. Will use default UUID.randomUUID()");
logger.debug("Unable to locate MessageHeaders.IdGenerator. Will use default UUID.randomUUID()");
}
}
}

View File

@@ -107,7 +107,7 @@ public final class MessageHeaders implements Map<String, Object>, Serializable {
public static void setMessageIdGenerationStrategy(IdGenerator messageIdGenerationStrategy) {
Assert.state(MessageHeaders.messageIdGenerator instanceof DefaultIdGenerator, "'MessageHeaders.messageIdGenerationStrategy' " +
Assert.state(MessageHeaders.messageIdGenerator instanceof DefaultIdGenerator, "'MessageHeaders.messageIdGenerator' " +
"has already been set and can not be set again, unless reset() method is called");
if (logger.isInfoEnabled()){
logger.info("Message IDs will be generated using custom ID generation strategy: " + messageIdGenerationStrategy);