Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Camel provides a simple mechanism to integrate Dozer Mappers with it's own powerful Type Conversion framework. Its configured by creating an instance of 'DozerTypeConverterLoader' providing it the camel context and an optional Dozer mapper. If no mapper is supplied, Camel's registry will be searched for suitable instances. The loader will query the Dozer Mapper for the the types it converts and a register them with Camel's Conversionn type conversion framework to be handled by the mapper.

Info
titleLimitation

The Camel Dozer type converter does not support having the same type conversion paris in different mapping ids (eg map-id) in Dozer.

In Java it can be configured as follows:

...

Code Block
langxml

<!-- the registry will be scanndscanned and 'mapper' below will be found and installed -->
<bean id="dozerConverterLoader"  class="org.apache.camel.converter.dozer.DozerTypeConverterLoader" />
  
<bean id="mapper" class="org.dozer.DozerBeanMapper">
  <property name="mappingFiles">
    <list>
      <value>mapping.xml</value>
    </list>
  </property>
</bean>

...