ZK « Transaction « JPA Q&A





1. Howto use container managed JPA transactions with ZK?    zkoss.org

PS: I am using Scala to develop a ZK application. However the ZUL Editor always complains about "The type xxyyy is not visisble" is I use a custom class in ZUL. However in Scala classes are by default public, also the bytecode decompiled to java source shows "public class xxyyy".So although everything works fine, the ZUL xml editor somehow thinks the ...

2. ZK: hibernate commit    zkoss.org

3. Commit no data inZK231+Spring2+Hibernate3.2    zkoss.org

Orignial message at: https://sourceforge.net/forum/message.php?msg_id=4335664 By: bhluo My Spring config file: context.xml: ">http://www.springframework.org/dtd/spring-beans.dtd"> com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/smt smt smt /WEB-INF/AppUser.hbm.xml /WEB-INF/SmtItemMaintainV.hbm.xml false true

4. ZK + Hibernate: saveOrUpdate is not valid without active transaction - error    zkoss.org

This tells ZK not to spawn a new event thread and thus we can eliminate the ThreadLocal issue. What the OpenSessionInViewListener did is to open transaction in the beginning of a http request and close transaction at the end of the http request. If you still encounter issues, it is better that you can provide some sample codes.

5. Hibernate + ZK: createQuery is not valid without active transaction    zkoss.org

Hi all, I have a similar problem. I did like in Small Talks - Hibernate + ZK exemple. And it worked well until i add a many-to-one relation in my hibernate mapping. Now i can load my objects with the referenced objects and access it. BUT it seem I can't save a new object (with many-to-one relation) without create a transaction ...

6. Help : Hibernate class with many-to-one don't save-update/commit    zkoss.org

*** ANSWERED/SOLVED *** Hi all, I did like in Small Talks - Hibernate + ZK exemple. And it worked well until i add a many-to-one relation in my hibernate mapping. Now i can load my objects with the referenced objects and access it. BUT it seem I can't save a new object (with many-to-one relation) without create a transaction and i ...

7. I really need an answer : Could we / Should we manage our hibernate Transaction in ZK    zkoss.org

OK, what i mean is i have at no time try out what happens when you want to saveAndUpdate() a new Object with a new Object in relation. I.e. new HeuresEffectuees() and new Repondant() at the same time.In my logic it must be sure that the second (related) object is already in DB or if not, it must be safed before ...

8. JPA How to lock Entity in zk :)    zkoss.org

javax.persistence.TransactionRequiredException: no transaction is in progress at org.hibernate.ejb.AbstractEntityManagerImpl.lock(AbstractEntityManagerImpl.java:379) at com.ksrchiangmai.gs.window.test.JPA.onCreate(JPA.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:623) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:209) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:488) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:422)Jun 13, 2009 4:15:06 PM org.apache.catalina.core.StandardWrapperValve invokeSEVERE: Servlet.service() for servlet zkLoader threw exceptionjavax.persistence.TransactionRequiredException: no transaction is in progress at org.hibernate.ejb.AbstractEntityManagerImpl.lock(AbstractEntityManagerImpl.java:379) at com.ksrchiangmai.gs.window.test.JPA.onCreate(JPA.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:623) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:209) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141) ...

9. Hib+ZK: createQuery is not valid without active transaction    forum.hibernate.org

Hi, I'm using Hibernate together with ZK. I get this error message (not valid without active transaction) I'm doing 2 different ZK events, each running an own java thread, having a session and having non equal transactions. I use HibernateSessionContextListener, as proposed in Small Talks - Hibernate + ZK. in hibernate cfg file I use... org.hibernate.transaction.JDBCTransactionFactory thread First I ...