RE: [Hibernate] Hibernate Thread Local Session and JUnit

2003-01-03 Thread Gavin King
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

RE: [Hibernate] Hibernate Thread Local Session and JUnit

2003-01-03 Thread Matt Raible
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

RE: [Hibernate] Hibernate Thread Local Session and JUnit

2003-01-03 Thread Gavin King
> 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.) *

[Hibernate] Hibernate Thread Local Session and JUnit

2003-01-02 Thread Matt Raible
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