对于(Glassfish v2.1),来自会话bean的两个单独请求的两个RuntimeExceptions:
org.hibernate.SessionException:会话结束了!org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.j
我创建了一个会话,调用了createQuery(),得到了list(),最后我调用了session.flush(),但是它抛出了一个异常,说明会话已经关闭。我的上下文会话设置为
session = HibernateUtil.getSessionFactory().openSession();session.flush(); // <---- This is where the excepti