How can I avoid ResourceExceptions when sending more requests for database connections from the connection pool than are currently available?
The fundamental problem is too few resources (database connections in the connection pool) for the work load. The correct response is to increase the maximum number of connections in the connection pool. Optimally designed applications only require the server to have one pool connection per execute thread.