You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Cory Watson <jh...@gmail.com> on 2005/09/18 05:19:54 UTC

Another Stupid Hibernate Question (TP4)

I can't find a definitive answer for how to utilize Hibernate  
properly in Tapestry.

I used to use a 'Session In View' by way of a HibernateHelper class  
with that held the session in a ThreadLocal, then utilized my  
Engine's cleanupAfterRequest().  This suddenly no longer works right  
in TP4.  My cleanupAfterRequest() never gets called.

I see custom services, hivetranse, spring, and servlet filters.  I  
realize that all of these probably have their place, but I don't  
understand which one is good for me.  I'm a bit leery of using Spring  
for something this simple, and the hivemind ways scare me because i  
only see whispers of it and no examples that help me understand how  
to do it.

So help a guy out.  What's the best way to accomplish the proper  
session.close() and session.flush() at the end of a request?  That's  
all I'm after.  For now I'll use a servlet filter.

Cory Watson
http://www.onemogin.com


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


Re: Another Stupid Hibernate Question (TP4)

Posted by Tomáš Drenčák <to...@gmail.com>.
Look at this http://www.theserverside.com/articles/article.tss?l=HivemindBuzz,
maybe helps you to better understand hivemind and also there's a good
hivemind session service (which I use :) which can be injected into
services

2005/9/18, Chris Nelson <cn...@yahoo.com>:
> I use the OpenSessionInViewFilter that comes with
> Spring in Trails.  It's been working fine for me in
> TP4.
> 
> --Chris
> 
> --- Cory Watson <jh...@gmail.com> wrote:
> 
> > I can't find a definitive answer for how to utilize
> > Hibernate
> > properly in Tapestry.
> >
> > I used to use a 'Session In View' by way of a
> > HibernateHelper class
> > with that held the session in a ThreadLocal, then
> > utilized my
> > Engine's cleanupAfterRequest().  This suddenly no
> > longer works right
> > in TP4.  My cleanupAfterRequest() never gets called.
> >
> > I see custom services, hivetranse, spring, and
> > servlet filters.  I
> > realize that all of these probably have their place,
> > but I don't
> > understand which one is good for me.  I'm a bit
> > leery of using Spring
> > for something this simple, and the hivemind ways
> > scare me because i
> > only see whispers of it and no examples that help me
> > understand how
> > to do it.
> >
> > So help a guy out.  What's the best way to
> > accomplish the proper
> > session.close() and session.flush() at the end of a
> > request?  That's
> > all I'm after.  For now I'll use a servlet filter.
> >
> > Cory Watson
> > http://www.onemogin.com
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tapestry-user-help@jakarta.apache.org
> >
> >
> 
> 
> 
> 
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

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


Re: Another Stupid Hibernate Question (TP4)

Posted by Chris Nelson <cn...@yahoo.com>.
I use the OpenSessionInViewFilter that comes with
Spring in Trails.  It's been working fine for me in
TP4.

--Chris

--- Cory Watson <jh...@gmail.com> wrote:

> I can't find a definitive answer for how to utilize
> Hibernate  
> properly in Tapestry.
> 
> I used to use a 'Session In View' by way of a
> HibernateHelper class  
> with that held the session in a ThreadLocal, then
> utilized my  
> Engine's cleanupAfterRequest().  This suddenly no
> longer works right  
> in TP4.  My cleanupAfterRequest() never gets called.
> 
> I see custom services, hivetranse, spring, and
> servlet filters.  I  
> realize that all of these probably have their place,
> but I don't  
> understand which one is good for me.  I'm a bit
> leery of using Spring  
> for something this simple, and the hivemind ways
> scare me because i  
> only see whispers of it and no examples that help me
> understand how  
> to do it.
> 
> So help a guy out.  What's the best way to
> accomplish the proper  
> session.close() and session.flush() at the end of a
> request?  That's  
> all I'm after.  For now I'll use a servlet filter.
> 
> Cory Watson
> http://www.onemogin.com
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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