Wouldn't that be pretty resource intensive since it would basically mean
that you have a database connection for every user session in your app.
Typically that is pretty bad and getting a new connection from a connection
pool is usually pretty quick.

I'm unfamiliar with how hibernate manges sessions and connections so let me
know if I'm wrong.

I'm looking at using Hibernate in my struts actions, but also in my ejbs so
of course I wouldn't be able to tie hibernate sessions with http sessions.

Thanks,
BAL
----- Original Message ----- 
From: "Riyad Kalla" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, June 07, 2004 7:13 PM
Subject: OT: Hibernate Session to User Session


> I was reading in the Hibernate forums that when you have a WebApp > DAO
> > Hibernate > DB design, and you open/close each Hibernate session at
> every single DAO method call (what I do now) its actually quite
> expensive, and is suggested that you attempt to maintain a Hibernate
> Session in conjunction with a user Session to increase performance.
>
> I had a question for anyone that has done this (without using
> SpringFramework). My gut-reaction to this was to add a
> HttpSessionListener to my webapp that created and stored a Hibernate
> session in the user's session, and then close it when the Session
> expired... will this not work? Anyone else have a good solution for
> this?
>
> TIA,
> Riyad
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to