Configuring the ZK Configuration File"
From Documentation
(Created page with ' {{ZKDevelopersGuidePageHeader}} To make ZK works with Hibernate smoothly, you have to use the following utilities. # Create <tt>zk.xml</tt> under <tt>$myApp/WEB-INF/</tt>(if n…') |
m (correct highlight (via JWB)) |
||
Line 4: | Line 4: | ||
To make ZK works with Hibernate smoothly, you have to use the following utilities. | To make ZK works with Hibernate smoothly, you have to use the following utilities. | ||
− | # Create < | + | # Create <code>zk.xml</code> under <code>$myApp/WEB-INF/</code>(if not exists) |
− | # Copy the following lines into your < | + | # Copy the following lines into your <code>zk.xml</code> |
<source lang="xml" > | <source lang="xml" > | ||
Line 27: | Line 27: | ||
</source> | </source> | ||
− | < | + | <code>$myApp</code> represents the name of your web application. ex. <code>event</code> |
{{ ZKDevelopersGuidePageFooter}} | {{ ZKDevelopersGuidePageFooter}} |
Latest revision as of 10:38, 19 January 2022
This documentation is for an older version of ZK. For the latest one, please click here.
To make ZK works with Hibernate smoothly, you have to use the following utilities.
- Create
zk.xml
under$myApp/WEB-INF/
(if not exists) - Copy the following lines into your
zk.xml
<!-- Hibernate SessionFactory lifecycle -->
<listener>
<description>Hibernate SessionFactory lifecycle</description>
<listener-class>org.zkoss.zkplus.hibernate.HibernateSessionFactoryListener</listener-class>
</listener>
<!-- Hibernate OpenSessionInView Pattern -->
<listener>
<description>Hibernate Open Session In View life-cycle</description>
<listener-class>org.zkoss.zkplus.hibernate.OpenSessionInViewListener</listener-class>
</listener>
<!-- Hibernate thread session context handler -->
<listener>
<description>Hibernate thread session context handler</description>
<listener-class>org.zkoss.zkplus.hibernate.HibernateSessionContextListener</listener-class>
</listener>
$myApp
represents the name of your web application. ex. event