You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/05/16 12:57:29 UTC
DO NOT REPLY [Bug 34935] New: -
[pool] changes the borrowObject method so it advoids catching an exception
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34935>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=34935
Summary: [pool] changes the borrowObject method so it advoids
catching an exception
Product: Commons
Version: 1.2 Final
Platform: Other
OS/Version: other
Status: NEW
Severity: enhancement
Priority: P2
Component: Pool
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: dirkv@apache.org
>From Sandy McArthur 2005-05-13 23:38
changes the borrowObject method so it advoids catching an exception
as part of the normal code path
This is a performance patch for the borrowObject method. The current (1.2)
implementaion of this method uses an EmptyStackException thrown by the backing
Stack's pop() method as part of the normal code flow to determine if the
factory should be used to make a new object.
When possible this should be advoided because a lock across the entire JVM must
be aquired when populating the stack trace of an Exception. This can have a
siginificant effect on a multi-processor box.
In this situation it is possible to advoid an Exception by checking the result
of the Stack.empty() method. This patch replaces the try/catch with an if/else.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org