Is there a way to have NHibernate automatically connect, then disconnect for every read, without calling Reconnect, Disconnect, etc? We are using connection pooling and do not want to keep the connection alive for a long period of time.
Thanks,
Sean
No no, I wasn’t… I was just asking the question… I figured it was, but I’ve been having problems with connections leaking so I am trying to track down some answers…
Basically, we were leaking connections and I found a scenario in our app where we were not closing our NHibernate session… So I guess I figured it wasn’t closing the connection each time…
J No problem… I am bad at explain my question\situation sometimes…
Well, I found a scenario where the session was not getting closed. Once I fixed that I am not having connection pool problems any more. But I am curious as to why, even with the close, NHibernate holds on to connections if it is indeed releasing the connection after each call to the database.
Hmm… I really don’t think so, I was only doing a single HQL Query (with .List()) in the session… I can dig some more to verify that, but…
Sounds great… thanks guys! I appreciate it…
Another question coming soon J
From:
nhu...@googlegroups.com [mailto:nhu...@googlegroups.com] On Behalf Of Fabio
Maulo
Sent: Tuesday, November 25, 2008 8:56 PM
To: nhu...@googlegroups.com
Subject: [nhusers] Re: Database Connections..
check this list for this thread