This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
No announcement yet.
what does jdbcTemplate do for us?Page Title Module
No, you don't need to close the resultset, connection, etc. What JdbcTemplate does for you is provide various methods for accessing your database without having to worry about catching exceptions or closing your resources.
Basically JdbcTemplate is the basis of straight JDBC in Spring.
well,I now have read that.there is no need to close the resultset or the connection,but a kind of situation confused me.
I am using JdbcDaoSupport to access my db,which is wrapped with c3p0 datasource;I was trying to invoke a method in my DAO(include result operations) while iterating a resultset in another method.then c3p0 indicated that there's a deadlock! after I added xml-define transaction to these methods,the deadlock disappeared.how to explain this?
also deadlock hints appear while I am using hibernate in an other program.
I cannot find why this keeps happening(I add transaction per request in
the filter in this program using hibernate).