I am using MappingSqlQuery to execute a query, but inside the method
protected Object mapRow(ResultSet rs, int rownum) that I need to implement, I would like to get the same Connection that created the rs.
I get the dataSource from JdbcTemplate, but if I do
DataSourceUtils.getConnection(dataSource) I will get another connection, won't I ?
besides I have to worry to close the connection, I borrow two connection from poll unnecessarily.
Does somebody have a suggestion ?


Reply With Quote