I am using Hibernate 3.6 with
session-per-request session management. If I get my sessions using sessionFactory.getCurrentSession(), am I required to explicitly call close() and the end of a transaction? Hibernate's documentation states that there is automatic "clean up" performed when commit() or rollback() are called, but no details as to what that clean up is doing; is the session cleared? is the jdbc connection released, don't know.
Code:
try{
session = sf.getCurrentSession();
session.beginTransaction()
//do some work
session.getTransaction().commit();
}catch(Exception e){
session.getTransaction().rollback();
}finally{
session.clear(); //<--- required?
session.close() //<----- required??
SAFX