https://issues.apache.org/bugzilla/show_bug.cgi?id=50805

Filip Hanik <fha...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Filip Hanik <fha...@apache.org> 2011-02-18 10:34:54 EST ---
hi Eiji, thanks for your bug report. 
I'm a bit confused by your suggested patch. Seems as the problem is that it
calls borrowConnection when it shouldn't based on the input data.

Index: java/org/apache/tomcat/jdbc/pool/ConnectionPool.java
===================================================================
--- java/org/apache/tomcat/jdbc/pool/ConnectionPool.java    (revision 1071670)
+++ java/org/apache/tomcat/jdbc/pool/ConnectionPool.java    (working copy)
@@ -1090,7 +1090,7 @@
                 if (result!=null) return result;
                 if (configured.compareAndSet(false, true)) {
                     try {
-                        pc = borrowConnection(System.currentTimeMillis(),pc,
null, null);
+                        pc =
this.pc!=null?this.pc:borrowConnection(System.currentTimeMillis(),pc, null,
null);
                         result = ConnectionPool.this.setupConnection(pc);
                     } catch (SQLException x) {
                         cause = x;


Doesn't this one liner do exactly what you need? A test case would be help ful,
I will create one today if I have time

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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

Reply via email to