You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jan Vissers <Ja...@cumquat.nl> on 2008/04/25 15:30:43 UTC

T5 - how to have every request have one jpa 'session'

Hi,

We're about to use JPA in our T5 application. Does someone have some good
pointers for us how to introduce 'session-per-request' functionality for
that combo. Basically what I want is to introduce a fresh EntityManager at
the start of T5's request and commit (or rollback) at the end of it.
Obviously from within our pages/services we need to get access to the
EntityManager instance as well.

Thx,
-J.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5 - how to have every request have one jpa 'session'

Posted by Chris Lewis <ch...@bellsouth.net>.
Jan,

The tapestry-hibernate module does exactly that:

http://tapestry.apache.org/tapestry5/tapestry-hibernate/index.html

Even if you don't use that module (or even hibernate), the source will
show you everything you need.

chris

Jan Vissers wrote:
> Hi,
>
> We're about to use JPA in our T5 application. Does someone have some good
> pointers for us how to introduce 'session-per-request' functionality for
> that combo. Basically what I want is to introduce a fresh EntityManager at
> the start of T5's request and commit (or rollback) at the end of it.
> Obviously from within our pages/services we need to get access to the
> EntityManager instance as well.
>
> Thx,
> -J.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>   

-- 
http://thegodcode.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org