
23 Jan
2012
23 Jan
'12
2:38 p.m.
Hi all, I am refactoring now DiskImageDAODbFacadeImpl. As part of my work, I'm also defining there a Spring-JDBC mapper , similar to other ParameterizedRowMapper based mappers we have in code (i.e DbUserDAODbFacadeImpl has one) Looks like in our DAO getXXXX methods we instantiate these mapper objects (each method creates a new mapper object). Can anyone see a reason , in case a mapper object is stateless (and from what I see, they are) - why not to have a single instantiation per mapper type (i.e - Have a MapperUtils class, with static methods like MapperUtils.getDiskImageMapper() ? IMHO this can save us some unnecessary instanatiations and improve performance Yair