Имах същия проблем и успях да го поправя, като добавих следния код в моя ServletContextListener
:
import oracle.ucp.admin.UniversalConnectionPoolManager;
import oracle.ucp.admin.UniversalConnectionPoolManagerImpl;
public class MyContextListener implements ServletContextListener {
/* ... */
@Override
public void contextDestroyed(ServletContextEvent sce) {
// Your shutdown sequence here
/* ... */
// Shutdown UCP if present, to avoid warnings about thread leaks
UniversalConnectionPoolManager ucpManager = UniversalConnectionPoolManagerImpl.getUniversalConnectionPoolManager();
if (ucpManager != null) {
String[] poolNames = ucpManager.getConnectionPoolNames();
if (poolNames != null) {
for (String poolName : poolNames) {
ucpManager.destroyConnectionPool(poolName);
}
}
}
}
}