经过更多研究后,我发现明确地关闭所有连接可以解决此问题:
C3P0Registry.getNumPooledDataSources();@SuppressWarnings({ "unchecked", "rawtypes" })Iterator<Set> it = C3P0Registry.getPooledDataSources().iterator();while (it.hasNext()) { try {dataSource = (PooledDataSource) it.next();dataSource.close(); } catch (Exception e) {logger.error(e); }}


