-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have all three prescribed listeners in my WEB-INF/zk.xml:
<listener>
<description>Hibernate SessionFactory life cycle</description>
<listener-class>org.zkoss.zkplus.hibernate.HibernateSessionFactoryListener</listener-class>
</listener>
<listener>
<description>Hibernate Open Session In View life cycle</description>
<listener-class>org.zkoss.zkplus.hibernate.OpenSessionInViewListener</listener-class>
</listener>
<listener>
<description>Hibernate thread session context handler</description>
<listener-class>org.zkoss.zkplus.hibernate.HibernateSessionContextListener</listener-class>
</listener>
And my DAO follows the example by calling getCurrentSession() whenever I instantiate one.
Problem is, I can't do saveOrUpdate(), I always get 'Session is Closed' Error.
My problem is similar to the one described in this thread:
http://www.zkoss.org/forum/listComment/11872
I also end up calling openSession() to save my data.
What am I missing?
Hi dataguy12,
What version of ZK are you using?
Did you read the following doc?
http://books.zkoss.org/wiki/ZK_Developer%27s_Reference/Integration/Hibernate
Asked: 2011-02-02 18:34:15 +0800
Seen: 486 times
Last updated: Jun 19 '11