You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/12/15 10:40:37 UTC

DO NOT REPLY [Bug 50477] New: If you set 0 to initialSize, can't obtain Connection by using getConnectionAsync method.

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

           Summary: If you set 0 to initialSize, can't obtain Connection
                    by using getConnectionAsync method.
           Product: Tomcat Modules
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: jdbc-pool
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: mashmk02@gmail.com


Created an attachment (id=26408)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26408)
patch for ConnectionPool.java

The getConnectionAsync method returns a ItemFuture, and the ItemFuture.get
method retrieves Connection from the idle queue (= FairBlockingQueue).
If initialSize is 0, there is no PooledConnection in the idle queue. (And,
there is no way to insert PooledConnection to the idle queue except to use the
getConnection method.)
Therefore, the ItemFuture.get method doesn't return Connection.

I made the patch. It is the following. 
If the pool size is empty then create a PooledConnection and insert it to the
idle queue.

regards.

-- 
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 50477] If you set 0 to initialSize, can't obtain Connection by using getConnectionAsync method.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50477

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Filip Hanik <fh...@apache.org> 2011-01-06 18:54:09 EST ---
Thank you for the report. Sorry for the delay.
Fixed in revision 
http://svn.apache.org/viewvc?view=revision&revision=1056125

-- 
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org