garydgregory commented on PR #411:
URL: https://github.com/apache/commons-dbcp/pull/411#issuecomment-2277916490

   Hello @johnou,
   
   I think the following should handle your use case now:
   ```java
           BasicDataSource bds = new BasicDataSource();
           // Won't fail fast on _all_ category "08" (connection exception)
           final Set<String> sqlCodes = Utils.getDisconnectionSqlCodes();
           // Actual "08" codes I care about.
           sqlCodes.add("08000");
           sqlCodes.add("08001");
           ...
           bds.setDisconnectionSqlCodes(sqlCodes);
           bds.setFastFailValidation(true);
   ```
   I could see making the SQL code set work with regular expressions to avoid 
having to list codes exhaustively or adding an ignore set.
   
   I think there is value in the idea but I still feel this proposal as too 
intrusive and complex where the practical goal is to exclude just 2 SQL codes 
("08S02" and "08007").
   It feels it too complex because it's an additional layer _in addition_ to 
the current system, as opposed to for example, a refactoring of the current 
mechanism where the current behavior is implemented using a new pluggable 
system.
   
   I could be wrong, let's see if anyone else chimes in.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to