I meant more like connection pooling (or hibernate session) factories being managed by hivemind.
You could do that in a setup and teardown method, but it may get a little heavy. We are cheating by using testng though, where you can easily specify methods that should be run before/after a suite/class/method. So, in our case, we just do it once before the suite and then cleanupThread after. Testng is nice sometimes :) On 12/20/05, Ron Piterman <[EMAIL PROTECTED]> wrote: > > Thanx Jesse, > I don't understand what zou mean with calling hivemind factories, but > maybe its important to know we currently only test our business layer, > so if you meant tapestry-factories than its irrelevant. > > So if I get it right, I have to add Registry.setupThread/cleanupThread > in the Test's setUp and tearDown... > > Thanx alot, > Ron > > > > Jesse Kuhnert wrote: > > Hivemind only cleans up threads that you tell it to manage, ie > > Registry.setupThread()/Registry.cleanupThread(). > > > > We had the same problem momentarily in our unit tests, until we tracked > down > > the problem to that. Also be sure that you're not calling methods > directly > > on hivemind factories that would otherwise be called by an injected > > session..Otherwise that thread too will not be managed. > > > > Tapestry does this for you by calling setupThread()/cleanupThread() > within > > the ApplicationServlet that it uses. (If you choose to use it.) > > > > On 12/20/05, Ron Piterman <[EMAIL PROTECTED]> wrote: > > > >>Hi, > >> > >>We use hivemind registry in JUnit, and it seems not to clean up threads, > >>so all hivemind sessions remain open, causing very fast all database > >>connections to be used :( > >> > >>Does anyone know the problem and, more important, a solution? > >> > >>Cheers, > >>Ron > >> > >> > >>--------------------------------------------------------------------- > >>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] > >