jsp页面里的SessionFactory.closeSession();这句加在那里做什么?public void editNews(News news)throws HibernateException
{
session=SessionFactory.currentSession();
tx=session.beginTransaction();
session.update(news);
tx.commit();
SessionFactory.closeSession();
}
-------
这里的SessionFactory应该是静态类
关闭session应该直接写session.close()不过这个还是要看自己具体是怎么设计的,你的SessionFactory.closeSession()是针对哪个呢