Author: kfujino
Date: Wed Aug 31 07:50:06 2016
New Revision: 1758537
URL: http://svn.apache.org/viewvc?rev=1758537&view=rev
Log:
Additional fix for BZ60043.
Add log message of when returning the connection that has been marked suspect.
Modified:
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
tomcat/trunk/webapps/docs/changelog.xml
Modified:
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java?rev=1758537&r1=1758536&r2=1758537&view=diff
==============================================================================
---
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
(original)
+++
tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
Wed Aug 31 07:50:06 2016
@@ -895,7 +895,12 @@ public class ConnectionPool {
if (con != null) {
try {
con.lock();
-
+ if (con.isSuspect()) {
+ if (poolProperties.isLogAbandoned() &&
log.isInfoEnabled()) {
+ log.info("Connection(" + con + ") that has been marked
suspect was returned."
+ + " The processing time is " +
(System.currentTimeMillis()-con.getTimestamp()) + " ms.");
+ }
+ }
if (busy.remove(con)) {
if (!shouldClose(con,PooledConnection.VALIDATE_RETURN)) {
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1758537&r1=1758536&r2=1758537&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Aug 31 07:50:06 2016
@@ -343,6 +343,10 @@
without removing connection when the <code>removeAbandoned</code> is
disabled. (kfujino)
</fix>
+ <fix>
+ Add log message of when returning the connection that has been marked
+ suspect. (kfujino)
+ </fix>
</changelog>
</subsection>
<subsection name="Other">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]