+ try {
+ if (connectionPool.getNumActive() > 0) {
+ String msg = "JDBC connection pool still has " +
+ connectionPool.getNumActive() +
+ " active connection(s), this is a potential resource leak in the code\n";
+ // backdoor to ignore connection leaks. Use this system property only if you
+ // can safely ignore the connection leaks.
+ if (System.getProperty(IGNORE_CONNECTION_LEAK_PROPERTY) == null) {
+ Assert.fail(msg);
+ }
+ }
+ connectionPool.close();
+ connectionPool.close();
+ } catch (Exception e) {
+ LOGGER.log(Level.WARNING, "Could not close pool", e);
+ }