On Thu, 25 Feb 2016 11:30:44 -0300, g kuczera <gkucz...@gmail.com> wrote:
In the end I gave up implementing the JPA, because I do not want to mix
these two different approaches (Hibernate sessions and JPA).
The suggestion would be using JPA instead of Hibernate, not mixing them.
So I have one questions: where do I find the HibernateSessionManager
implementation?
https://github.com/apache/tapestry5/blob/master/tapestry-hibernate-core/src/main/java/org/apache/tapestry5/internal/hibernate/HibernateSessionManagerImpl.java
It looks that I can't use regular
session.getTransaction().commit() becase it gives me *Transaction not
successfully started *error.
In this case, you should start the transaction manually, just as you
commit it manually.
I have been reading about these (hibernate and tapestry) machanisms and
it looks that every thread has it's own session, which is being managed
by
HibernateSessionManager. I am not pretty sure how to obtain that manager,
to safely commit the transaction.
It's a Tapestry-IoC service, so you can @Inject it in your pages or have
it automatically injected into your services' constructors.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org