Currently dozer supports the loading of xmls from the filesystem either via the class path or physical path of the mapping xmls.
Is there a mechanism to load the mapping xmls from the DB and refresh the mapper bean during the runtime, basically i need to find a way to hold the mapping.xml in the DB and refresh the mapper interface whenever its required.
Please suggest if there are any options for the same.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The only way to refresh mappings is to create a new instance of DozerBeanMapper. But it should not be a problem. For dynamic mappings you may check the trunk version, where dynamic API mappings are implemented. Looks something like this:
With this approach you could read your configuration from DB, create new Dozer instance and inject dynamic mappings via API. API mappings and XML could be mixed.
Dmitry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Currently dozer supports the loading of xmls from the filesystem either via the class path or physical path of the mapping xmls.
Is there a mechanism to load the mapping xmls from the DB and refresh the mapper bean during the runtime, basically i need to find a way to hold the mapping.xml in the DB and refresh the mapper interface whenever its required.
Please suggest if there are any options for the same.
Hi,
The only way to refresh mappings is to create a new instance of DozerBeanMapper. But it should not be a problem. For dynamic mappings you may check the trunk version, where dynamic API mappings are implemented. Looks something like this:
With this approach you could read your configuration from DB, create new Dozer instance and inject dynamic mappings via API. API mappings and XML could be mixed.
Dmitry