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: [email protected]
ReportedBy: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]