[
https://issues.apache.org/jira/browse/DBCP-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14312593#comment-14312593
]
Thomas Neidhart commented on DBCP-433:
--------------------------------------
The OP mentioned that in this scenario the pool can be quickly exhausted, but I
guess the same will happen when the connection is invalidated -> destroyed. At
least the connection will not be leaked but properly cleaned up.
> Connection leak when SQLException is thrown while enlisting in XA transaction
> -----------------------------------------------------------------------------
>
> Key: DBCP-433
> URL: https://issues.apache.org/jira/browse/DBCP-433
> Project: Commons Dbcp
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: All
> Reporter: Vladimir Konkov
> Attachments: DBCP-433_patch.diff, TestManagedConnection.java
>
>
> In ManagedConnection when delegate connection is null new real (driver)
> connection is borroved from pool. If SQLExcetion is thrown in
> 'TransactionContext.enlistResource()' that borrowed connection is lost
> (leaked).
> Short fail on network side may immediately exhaust the pool.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)