sometimes I need to call a store procedure for n times in a forEach. This works fine but sometimes when n is so large I have problem with connection pool. Particularely I got this exception:
10:34:18,965 ERROR [it.eurobet.easy.service.admin.GroupServiceImpl] (default task-8) Could not get JDBC Connection; nested exception is java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/OracleDS: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/OracleDS
If I increase the number of connection pool, I fix this issue but I don't think this is the better way. I suppose (for this type of operation) I need 1 connection pool for exectue all stored procedures.
Someone can help me?
Thanks