INT-1903 more polishing
This commit is contained in:
@@ -50,14 +50,14 @@ public class IntegrationContextRefreshListener implements ApplicationListener<Co
|
|||||||
IdGenerator idGenerationStrategy =
|
IdGenerator idGenerationStrategy =
|
||||||
event.getApplicationContext().getBean(IdGenerator.class);
|
event.getApplicationContext().getBean(IdGenerator.class);
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("Using MessageHeaders.MessageIdGenerationStrategy [" + idGenerationStrategy + "]");
|
logger.debug("Using MessageHeaders.IdGenerator [" + idGenerationStrategy + "]");
|
||||||
}
|
}
|
||||||
MessageHeaders.setMessageIdGenerationStrategy(idGenerationStrategy);
|
MessageHeaders.setMessageIdGenerationStrategy(idGenerationStrategy);
|
||||||
}
|
}
|
||||||
catch (NoSuchBeanDefinitionException ex) {
|
catch (NoSuchBeanDefinitionException ex) {
|
||||||
// We need to use the default.
|
// We need to use the default.
|
||||||
if (logger.isDebugEnabled()) {
|
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()");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ public final class MessageHeaders implements Map<String, Object>, Serializable {
|
|||||||
|
|
||||||
|
|
||||||
public static void setMessageIdGenerationStrategy(IdGenerator messageIdGenerationStrategy) {
|
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");
|
"has already been set and can not be set again, unless reset() method is called");
|
||||||
if (logger.isInfoEnabled()){
|
if (logger.isInfoEnabled()){
|
||||||
logger.info("Message IDs will be generated using custom ID generation strategy: " + messageIdGenerationStrategy);
|
logger.info("Message IDs will be generated using custom ID generation strategy: " + messageIdGenerationStrategy);
|
||||||
|
|||||||
Reference in New Issue
Block a user