Welcome to the new Spring.io forums!
If this is your first visit, be sure to check out the
by clicking the link above, and for security reasons, use the
forgot password link to reset your password..
You may have to register before you can post: click the register
link above to proceed. To start viewing messages, select the forum that you want to visit
from the selection below.
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).