[Bug 64809] Connection properties not reset to defaults when Connection is returned to the pool

2020-10-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64809

--- Comment #2 from xiongchao  ---
 protected void returnConnection(PooledConnection con) {
if (this.isClosed()) {
this.release(con);
} else {
if (con != null) {
try {
this.returnedCount.incrementAndGet();
con.lock();
if (con.isSuspect()) {
if (this.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 (this.jmxPool != null) {
this.jmxPool.notify("SUSPECT CONNECTION RETURNED",
"Connection(" + con + ") that has been marked suspect was returned.");
}
}

if (this.busy.remove(con)) {
if (!this.shouldClose(con, 2)) {
con.setStackTrace((String)null);
con.setTimestamp(System.currentTimeMillis());
if (this.idle.size() >=
this.poolProperties.getMaxIdle() && !this.poolProperties.isPoolSweeperEnabled()
|| !this.idle.offer(con)) {
if (log.isDebugEnabled()) {
log.debug("Connection [" + con + "] will be
closed and not returned to the pool, idle[" + this.idle.size() + "]>=maxIdle["
+ this.poolProperties.getMaxIdle() + "] idle.offer failed.");
}

this.release(con);
}
} else {
if (log.isDebugEnabled()) {
log.debug("Connection [" + con + "] will be
closed and not returned to the pool.");
}

this.release(con);
}
} else {
if (log.isDebugEnabled()) {
log.debug("Connection [" + con + "] will be closed
and not returned to the pool, busy.remove failed.");
}

this.release(con);
}
} finally {
con.unlock();
}
}

}
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 64809] Connection properties not reset to defaults when Connection is returned to the pool

2020-10-13 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64809

Mark Thomas  changed:

   What|Removed |Added

   Target Milestone||---
Summary|it's  haven't reset |Connection properties not
   |connection properties based |reset to defaults when
   |on connectionpool   |Connection is returned to
   |configuration information   |the pool
   |when returnConnection   |
Version|8.5.11  |unspecified
  Component|Connectors  |jdbc-pool
Product|Tomcat 8|Tomcat Modules

--- Comment #1 from Mark Thomas  ---
Correcting product (I'm assuming jdbc-pool on the basis I've confirmed DBCP
does reset these properties)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org