Found the following thread about shutting down OpenEJB programatically here: http://www.mail-archive.com/[email protected]/msg00920.html
Says there is a close on the InitialContext that will shut it down. I attempted to make this call in my @AfterClass method, but it is never called because something is hanging before the JUnit can get this far in the process. Any ideas why introducting OpenEJB would cause my tests to hang now? How to fix that? TIA, ----- Original Message ---- > From: tbbstny <[email protected]> > To: [email protected] > Sent: Mon, November 29, 2010 9:54:50 AM > Subject: Need help getting Derby running in JUnit > > OK, I've written some tests using the "openejb:Resource/MYDB" lookup syntax > as > suggested. My tests are running fine, but they never stop. I can see all I > expect to see in the output window, but they just never stop running. If I > manually stop them, they are all green. In looking at threads and noticing >some > > exceptions along the way, it seems to me that embedding OpenEJB in JUnit > also > caused some connection pools to be in use for my derby connections. My > guess >is > > the pools are not being released for some reason. Can I just stop Open EJB > in > > the tear down? How would I do that? > > Thanks, >
