Hello, DBCP has a feature to pool PreparedStatements for the lifetime of a connection. This results in cursors being open and locks in the database for a long time, which could cause problems with administrative tasks in the database. That why I would prefer this pool to be more short-living, that means that the pool is filled while the application is using the connection und cleared when the application is returning the connection to the ConnectionPool. This way the application can still benefit from the Statement-cache in mass operations, without creating headaches for database admins.
I would suggest an additional setting like limitPreparedStatementPoolToConnectionUse or something similar. What do you think? Regards, Robert