title: Connection Pool "Leak" in development. Could it be due to JUnit test setup?
body: <p>I am trying to track down a database connection pool "leak" in development and I am wondering if it is resulting from how the unit tests are set up.  Something is grabbing database connections from the Glassfish pool and not closing them when done.  Eventually the pool max connections are used up and the application is unable to get any new db connections.</p>
  
  <p>Our JUnit tests get a connection from the pool in the setUp() method and then close that connection in the tearDown() method.  Can we be sure that the tearDown() method will ALWAYS run?  If an unhandled exception occurs, could the tearDown() method be bypassed?  </p>
  
  <p>Any other ideas on what we should look for?</p>
  
  <p>I should note that we are using Jakarta Cactus to run these unit tests on the Glassfish application server.</p>