Configuration

Dozer configuration properties can be customized via an optional Dozer properties file. By default, Dozer will look for a file named dozer.properties to load configuration properties. If a properties file is not found or specified, default values will be used.

Dozer is distributed with an example dozer.properties file in /config that shows the various options. Just put the example file in your classpath and customize it.

An alternative Dozer properties file can be specified via the dozer.configuration system property. ex) -Ddozer.configuration=someDozerConfigurationFile.properties

Dozer Configuration Properties

Property Name Description Valid Values Default
dozer.statistics.enabled Specifies whether Dozer collects runtime mapping statistics true|false false
dozer.autoregister.jmx.beans Specifies whether Dozer will auto register it's JMX beans with the PlatformMDBServer on startup true|false true
dozer.cache.converter.by.dest.type.maxsize Specifies the max size for one of Dozers internal caches 0 - Long.MAX_VALUE 5000
dozer.cache.super.type.maxsize Specifies the max size for one of Dozers internal caches 0 - Long.MAX_VALUE 5000

Debugging Initialization

One time Dozer initialization information can be optionally sent to System.out to help with debugging.

To enable this additional debugging info, set the dozer.debug system property.

ex) -Ddozer.debug=true

Types of information that will be sent to System.out are loading of configuration file, loading of custom xml mapping files, version info, classloader info

         
dozer:  Trying to find configuration file: dozer.properties
dozer:  Using URL [file:/C:/srcforge21X/dozer/config/dozer.properties] for global property configuration
dozer:  Reading properties from URL [file:/C:/srcforge21X/dozer/config/dozer.properties]
dozer:  Finished configuring global properties
dozer:  Initializing a new instance of the dozer bean mapper.  Version: 4.0, Thread Name:main
dozer:  Using the following xml files to load custom mappings for the bean mapper instance: [mapInterfaceMapping.xml, dozerBeanMapping.xml]
dozer:  Trying to find xml mapping file: mapInterfaceMapping.xml
dozer:  Using URL [file:/C:/srcforge21X/dozer/mappings/mapInterfaceMapping.xml] to load custom xml mappings
dozer:  Successfully loaded custom xml mappings from URL: [file:/C:/srcforge21X/dozer/mappings/mapInterfaceMapping.xml]
dozer:  Trying to find xml mapping file: dozerBeanMapping.xml
dozer:  Using URL [file:/C:/srcforge21X/dozer/mappings/dozerBeanMapping.xml] to load custom xml mappings
dozer:  Successfully loaded custom xml mappings from URL: [file:/C:/srcforge21X/dozer/mappings/dozerBeanMapping.xml]