tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50477] New: If you set 0 to initialSize, can't obtain Connection by using getConnectionAsync method.
Date Wed, 15 Dec 2010 09:40:37 GMT
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


Mime
View raw message