[
https://issues.apache.org/jira/browse/DBCP-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15630573#comment-15630573
]
Tony Schwartz commented on DBCP-472:
------------------------------------
agreed, but in addition to that check, i generally add logic to limit the
recursive calls. there could be a circle for example. maybe a loop counter
(or recursion counter) and stop at a thousand would do the trick.
Sent from my Verizon, Samsung Galaxy smartphone
-------- Original message --------From: "Mark Thomas (JIRA)" <[email protected]>
Date: 11/2/16 17:10 (GMT-05:00) To: [email protected] Subject: [jira] [Commented]
(DBCP-472) infinite loop in
PoolableConnection.isDisconnectionSqlException
[
https://issues.apache.org/jira/browse/DBCP-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15630536#comment-15630536
]
Mark Thomas commented on DBCP-472:
----------------------------------
If e.getNextException() == e is true then I'd argue that the bug is in whatever
code generated that Exception. That said, it would be sensible to protect DBCP
against it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
> infinite loop in PoolableConnection.isDisconnectionSqlException
> ---------------------------------------------------------------
>
> Key: DBCP-472
> URL: https://issues.apache.org/jira/browse/DBCP-472
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 2.1.1
> Reporter: Tony Schwartz
>
> There is an infinite loop in PoolableConnection.isDisconnectionSqlException.
> If e.getNextException() == e, which happens to be the case for me (I'm
> mybatis). I think there should be a check around line 329 to see if e ==
> e.getNextException() and if so, stop recursing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)