log.warn("Loaded " + configurations.size() + " Dozer configurations from Camel registry."
+ " Dozer is most efficient when there is a single mapper instance. Consider amalgamating instances.");
}
for (Map.Entry<String, DozerBeanMapperConfiguration> entry : configurations.entrySet()) {
String id = entry.getKey();
DozerBeanMapper beanMapper = createDozerBeanMapper(entry.getValue());
// only add if we do not already have it
if (!mappers.containsValue(beanMapper)) {
mappers.put(id, beanMapper);
}
}
}
if (mappers.size() > 1) {
log.warn("Loaded " + mappers.size() + " Dozer mappers from Camel registry."
+ " Dozer is most efficient when there is a single mapper instance. Consider amalgamating instances.");
} else if (mappers.size() == 0) {
log.warn("No Dozer mappers found in Camel registry. You should add Dozer mappers as beans to the registry of the type: "
+ DozerBeanMapper.class.getName());
}
TypeConverterRegistry registry = camelContext.getTypeConverterRegistry();
for (Map.Entry<String, DozerBeanMapper> entry : mappers.entrySet()) {
String mapperId = entry.getKey();
DozerBeanMapper dozer = entry.getValue();
List<ClassMap> all = loadMappings(camelContext, mapperId, dozer);
registerClassMaps(registry, mapperId, dozer, all);
}
}