public void XXX(){
Connection conn = ~~;
CallableStatement cstmt = conn.prepareCall("{call XXX");
cstmt.executeUpdate();
cstmt.close();
}
All methods that CallableStatement is described in close() line by line by the method like the above-mentioned. Cannot how to do close() in each method by the automatic operation be done?
Does the method that can be achieved with java5 or java6 exist?
Please tell me a better expression, because, I'm Japanese.
closing database objects should always be done in a finally block, so that they are closed regardless of whether an exception occurred or not.
here, i've taken the liberty to use IOUtils from commons-io