Quantcast
Channel: zeroturnaround.com » All Posts
Viewing all articles
Browse latest Browse all 2540

Dozer mapping not detecting new properties

$
0
0

Good morning,

We are developing on JBoss EAP 6.3.0.GA (AS 7.4.0.Final-redhat-19) and we are using Dozer 5.4.0 to map properties between Entities and Dto’s and betweeen Dto’s and Validation Beans.

When we add a property to an entity and the same property to a Dto and we perform a dozerBeanMapper.map(myEntity, myDto) Dozer does not copy the value from the entity to the dto, it’s just not aware of the existence of the new property.

I think this could be due to the way that the producer is created, it’s @ApplicationScoped:

public class DozerInstantiator {

@Produces
@DozerInstantiatioLiferayInject
@ApplicationScoped
public DozerBeanMapper getDozerBeanMapperLiferay()
throws NamingException {

String file1 = “META-INF/dozerBeanMappingConverters.xml”;
String file2 = “META-INF/dozerBeanMappingDtos.xml”;
DozerBeanMapper mapper = new DozerBeanMapper(Arrays.asList(file1, file2));

return mapper;
}
}

I need your advice so that I don’t have to restart the server in order to let Dozer to catch the changes with the new properties. I’m talking about properties that do not rely on the xml’s, when a dozerBeanMapper.map() is invoked it inspects existing properties thru reflection if those properties are not present inside the xml’s.

Thanks in advance.

  • This topic was modified 4 hours ago by  alfmateos.

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>