ASF Bugzilla – Attachment 35233 Details for
Bug 61425
all idle connections become '<IDLE> in transaction' when the 'testWhileIdle' is set to 'true' and 'defaultAutoCommit' is set to 'false'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
use this patch instead
file_61425.txt (text/plain), 964 bytes, created by
WangZheng
on 2017-08-16 13:00:14 UTC
(
hide
)
Description:
use this patch instead
Filename:
MIME Type:
Creator:
WangZheng
Created:
2017-08-16 13:00:14 UTC
Size:
964 bytes
patch
obsolete
>diff --git a/org/apache/tomcat/jdbc/pool/PooledConnection.java b/org/apache/tomcat/jdbc/pool/PooledConnection.java >index c833209..4615abf 100644 >--- a/org/apache/tomcat/jdbc/pool/PooledConnection.java >+++ b/org/apache/tomcat/jdbc/pool/PooledConnection.java >@@ -541,6 +541,22 @@ public class PooledConnection { > } > if (stmt!=null) > try { stmt.close();} catch (Exception ignore2){/*NOOP*/} >+ >+ try { >+ if(!connection.getAutoCommit()) { >+ connection.rollback(); >+ } >+ } catch (SQLException e) { >+ // do nothing >+ } >+ } finally { >+ try { >+ if(!connection.getAutoCommit()) { >+ connection.commit(); >+ } >+ } catch (SQLException e) { >+ // do nothing >+ } > } > return false; > } //validate
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 61425
:
35232
| 35233