-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4172307
By: kkurt
Hi, i found tutorial about core hibernate but there is no JPA with Hibernate tutorial. Would you prepare JPA with Hibernate tutorial, or any suggestion?
Thanks...
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4172455
By: henrichen
Are you saying Java Persistence API (JPA)? Well, we don't have such tutorial yet. Would you contribute one? The ZK community would appreciate it.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4172601
By: kkurt
Ok, i have already a ZK project runs on JPA with Hibernate. I will contribute a basic tutorial.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4174135
By: henrichen
Thanks. Looking forward to that.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4178127
By: henrichen
When you are ready. Send it to henrichen AT zkoss DOT org. Thanks
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4442166
By: kknop
Is this tutorial already available?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4442244
By: kknop
I found an JPA helper class at:
http://www.koders.com/java/fidD4B2D2CDF6FFB7430B2E2B08BBE22E2AFB52723C.aspx
And I want to create an OpenSessionInViewListener based on the ZK plus code but I am don't know what to do with handleStaleObjectStateException and handleOtherException.
Is there an example of an already working and proven JPA OpenSessionInViewListener?
Am I right that I only need these two classes (helper and listener) with the new 2.4.1 feature: "ThreadLocal Variables Synchronization"
(http://www.zkoss.org/smalltalks/zk2.4.1/zk2.4.1.dsp) to get it to work?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4442529
By: sousa1981
Go to: http://en.wikibooks.org/wiki/ZK/How-Tos
Direct Link: http://en.wikibooks.org/wiki/ZK/How-Tos#ZK_2.x.x_.2B_Spring_2.x.x_.
2B_Hibernate_3.x_.2B_JUnit_Test
There is an entry ZK 2.x.x + Spring 2.x.x + Hibernate 3.x + JUnit Test So, you could modify it to use JPA easily or use both together Hibernate and Jpa Implementation.
To change to use only JPA, do the following:
1. Under "C. Code - Data Access Object Layer:", on EmployeeDaoImpl.java and RoleDaoImpl.java modify Change hibernate3 to jpa under IMPORTS Change HibernateDaoSupport to JpaDaoSupport Change getHibernateTemplate to getJpaTemplate
2. Modify spring-sql.xml to use
org.springframework.orm.jpa.ContainerEntityManagerFactoryBean
Look at http://blog.springframework.com/markf/ to do that
3. There is no step 3. Run test case.
I am using ZK in second largest banking in mozambique and our users is very happy like me :)
I am finishing my site, so soon I will publish it. There will be many of my daily work.
> Spring x Hibernate x JPA with ZK
> Web Service with XFire build with and without Spring with ZK JMS
> Service with Spring with ZK I will expose many of tools, to make my
> job be fast (CODE GENERATION) of DAO
Layer and I now I am build same tools to make ZK Layer Generated fast and automatic (basic needs).
> So, I will write an Wish list for ZK releases.
Regards,
Marcos de Sousa
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4442543
By: sousa1981
spring-sql.xml, those code is nice, work great, but I will modify because need same upgrade.
The Configuration is more easy if it use AOP.
The DAO don't need any transaction management.
Only manager need transaction management, so it will reduce the code significantly.
And the use of Universal DAO, will be more nice on second explanation.
Regards,
Marcos de Sousa
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4443286
By: kknop
Hi Marcos,
Thanx for your help. I saw your description and I think that you made some very good choices. In the past I used JSF + Spring + Hibernate with their OpenSessionInViewFilter myself and in the teams I lead. It works really great and it really speeds up the development comparing it to Struts etc.
Now that I found ZK I also decided to take a look at JPA with annotations and I discovered that it simplified my work more and more. Many applications don't need transactions and for these applications I personaly like the most simple and lightweight architecture. If an applications starts needing transactions, it is always possible to integrate Spring afterwards. And because I am a big fan of tomcat, I am looking for a proven thread safe integration of ZK with JPA, without the use of Spring or an application server.
I did a lot of front-end development myself and until I found ZK I was convinced that JSF was the way to go. Comparing it to JSF I think the guys did it, big compliment to all the ZK developers!!! Keep up the good work, in my opion the next hibernate under the GUI frameworks :-)
Klaas Knop
Asked: 2007-02-22 11:38:40 +0800
Seen: 357 times
Last updated: Aug 02 '07