You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bill Holloway <bi...@gmail.com> on 2006/10/31 00:49:48 UTC

ThreadLocals for Hibernate in Tapestry 4.1

The Hibernate in Action book talks about using a servlet filter to
handle their thread-localized HibernateUtil commitTransaction and
closeSession calls.  But Howard has talked about thread locals being
handled deep inside hivemind.

I've got Tapestry 4.1 and am using Hibernate but am not using Spring.
So what's the best strategy here?  Should my HibernateUtil be a
hivemind service?  Should I just commit transactions in my page
listener methods?  Enquiring minds....

Thanks,
Bill

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


Re: ThreadLocals for Hibernate in Tapestry 4.1

Posted by James Carman <ja...@carmanconsulting.com>.
You can use Tapernate (www.carmanconsulting.com/tapernate) if you
want, but I'd recommend against the persistence strategies as I think
I have a better idea how to do it and it'll be changing soon.  The
hibernate configuration, open-session-in-view, data squeezer, and POJO
rollback features are worth using it though.

On 10/30/06, Bill Holloway <bi...@gmail.com> wrote:
> The Hibernate in Action book talks about using a servlet filter to
> handle their thread-localized HibernateUtil commitTransaction and
> closeSession calls.  But Howard has talked about thread locals being
> handled deep inside hivemind.
>
> I've got Tapestry 4.1 and am using Hibernate but am not using Spring.
> So what's the best strategy here?  Should my HibernateUtil be a
> hivemind service?  Should I just commit transactions in my page
> listener methods?  Enquiring minds....
>
> Thanks,
> Bill
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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