Thanks so much for your inputs. Also, I will be careful and use DTO going forward.
I have another related question, we have an application where some results from the datatbase are simply transformed to XML and returned to the client, while a few get enriched with data from other data-sources and then are returned to the client. In such an application would you advise using a ResultSet Wrapper for processing i.e. keeping the resultsets open while transforming data?
I have some very strong disagreements over using a DTO to handle such simple read operations. With my limited knowledge of
Java and performance, I think even using DTOs for this simple scenario is useful to avoid holding on to DB Connections.
Is it a good idea to have two types of data-structures, one which will hold a Results Map (as described above) and another which holds a ResultSet (Resultset Wrapper). The usage of these data structures will depend on the processing involved
Can you please give your thoughts on this?
Thanks,
Talib