最近采用ssh框架开发,有一个需要调用存储过程的,我采用的是以下这种方法
CallableStatement calls =positionSaveDaoImpl.getHibernatetemplate().getSessionFactory().getCurrentSession().connection().prepareCall("{Call position_save(?)}");
以上代码中:position_save是存储过程名,我想问下,上面这句代码我是写在了service层的,在事务的管理当中,意味着session在事务提交的时候会自动close, 但是我上面用用到了getCurrentSession().connection(),我需要在数据取出来后 关闭数据库连接吗,就是connection.close 还是说hibernate会自动帮我们关闭 ,以前不用三大框架的时候 每次调用完都得connect.close 我想问下采用hibernate我们要手动关闭吗