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 2011/07/29 10:10:00 UTC
DO NOT REPLY [Bug 51583] New: ConnectionPool.close() always waits
one second unnecessarily
https://issues.apache.org/bugzilla/show_bug.cgi?id=51583
Bug #: 51583
Summary: ConnectionPool.close() always waits one second
unnecessarily
Product: Tomcat Modules
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: jdbc-pool
AssignedTo: dev@tomcat.apache.org
ReportedBy: patric@rufflar.com
Classification: Unclassified
As discussed with Filip via mail: (just to do report it officially):
I've encountered an issue on closing the pool:
Closing a ConnectionPool will always take at least one second if more than zero
connections have been acquired.
Please have a look at ConnectionPool.java:367 :
con = pool.poll(1000, TimeUnit.MILLISECONDS);
Imagine that we've previously fetched the last connection out of the queue.
In this case the that command will cause that we've to wait 1000ms (to return
null).
The solution would be easy - just check prior to polling if the pool queue is
empty.
The 1 second wait time is really annoying because I am creating and destroying
the pool for each junit test which causes that each test will take more than 2
seconds (I am using two pools per test).
--
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 51583] ConnectionPool.close() always waits one
second unnecessarily
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51583
Filip Hanik <fh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Filip Hanik <fh...@apache.org> 2011-08-15 15:19:48 UTC ---
Fixed in r1157874
--
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