e [mailto:[EMAIL PROTECTED]
> Sent: Friday, 3 January 2003 5:03 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [Hibernate] Hibernate Thread Local Session and JUnit
>
>
> I'm using the Thread Local Session as described at
> http://hibernate.bluemars.net/42.html. To my knowle
Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Gavin King
> Sent: Thursday, January 02, 2003 7:47 PM
> To: Matt Raible; [EMAIL PROTECTED]
> Subject: RE: [Hibernate] Hibernate Thread Local Session and JUnit
>
>
>
> > The old way I was
> The old way I was doing it - now obviously kludgy - was to
> create a new session factory everytime I initialized a DAO.
That would have been your problem. You *must* make sure that
ALL DAOs are using the same Session instance. (And
SessionFactory _should_ certainly be a singleton.)
*
I am using the Thread Local Session Design Pattern as documented at:
http://hibernate.bluemars.net/42.html
This worked great in my web application when running through Tomcat. Tomcat
uses Commons DBCP for connection pooling.
The old way I was doing it - now obviously kludgy - was to create a ne