Tapestry-Hibernate creates it's own instance of the SessionFactory
http://tapestry.apache.org/current/apidocs/index.html?org/apache/tapestry5/internal/hibernate/HibernateSessionSourceImpl.html

You can have multiple SessionFactory instances (if you have multiple
databases for instance) so calling the static "getCurrentSession()" doesn't
make sense in this context.

I think you're trying to mix two paradigms. If you're working on a new
project consider doing things the Tapestry way. No HibernateUtils, @Inject
the session, or the HibernateSessionManager depending on what you need.

http://tapestry.apache.org/using-tapestry-with-hibernate.html

If you're trying to integrate into another system then give us some more
background on what you can and can't change and maybe someone will provide
some pointers.


Josh


On Wed, Nov 28, 2012 at 4:04 PM, Pillar <sotodel...@hotmail.com> wrote:

> As far as I know a Hibernate Session has only one Transaction at a time,
> hence the session.beginTransaction, session.getTransaction(). Also, the
> SessionFactory has the getCurrentSession() which returns a per thread
> session. So unless, I'm completely wrong in how I think tapestry-hibernate
> is implemented, it shouldn't have to much hard time finding the session
> from
> the SessionFactory, either starting the transaction itself or not, and then
> getting the transaction from the session and committing it.
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/CommitAfter-not-committing-my-transaction-tp5718364p5718374.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to