Jeg havde det samme problem og formåede at løse dette ved at tilføje følgende kode i min 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);
}
}
}
}
}