cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lundquist ...@wrinkledog.com>
Subject Re: Where to store a hibernate session in Flow?
Date Wed, 04 Aug 2004 02:21:35 GMT

On Aug 3, 2004, at 6:20 PM, Joel McConaughy wrote:

> I would like to open one hibernate session for each user session and 
> close it when the session is invalidated or times out.  I can see how 
> save the hibernate session in Flow using cocoon.session.setAttribute() 
> and cocoon.session.getAttribute() however there doesn't seem to be a 
> way to get notified when the session gets invalidated so I can close 
> the hibernate session.   Is there a way to do this?

Hi Joel,

Just curious, why do you want the Hibernate session to have the same 
lifetime as the user session?  Typically, in a web application context 
a Hibernate session should be thought of as corresponding to a single 
HTTP request/reply.

See also this article: 
http://cocoon.apache.org/2.1/userdocs/forms/index.html

Actually, they make mention of the "session-per-user-session 
anti-pattern" at the end of that article...

Cheers,
~ml


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


Mime
View raw message