Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370009 - ReadConnectionPool's new connection's call count is always greater than zero
Summary: ReadConnectionPool's new connection's call count is always greater than zero
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: submitted_patch
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 15:56 EST by Michael Nielson CLA
Modified: 2022-06-09 10:32 EDT (History)
2 users (show)

See Also:


Attachments
patch removing bad line (366 bytes, patch)
2012-01-27 15:56 EST, Michael Nielson CLA
andrei.ilitchev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Nielson CLA 2012-01-27 15:56:54 EST
Created attachment 210221 [details]
patch removing bad line

ReadConnectionPool.acquireConnection calls incrementCallCount twice on Accessor's causing them to always have a call count of 1 or more.
Comment 1 Tom Ware CLA 2012-02-17 10:43:32 EST
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Andrei Ilitchev CLA 2012-04-02 12:05:20 EDT
There is no connection leak in ReadConnectionPool.
This connection pool allows sharing connection and connection.callCount is used to cout how many times connection is used.
Because it's not an external connection pool, connection.callCount doesn't affect connection's lifespan: all original connections are connected in inherited startUp method, all the newly added connections (if any) - in acquireConnection (connection is built and connected in inherited build method). All these connections stay connected until the end of ReadConnectionPool's life, when (inherited) shutDown method disconnects them all.
Comment 3 Michael Nielson CLA 2012-04-02 12:20:39 EDT
You are right that the connections aren't leaked however the callCount never reaches zero so all connections must be iterated and the connection with the minimum call count must always be determined. This means the read connection pool will always show as entirely used. This behavior is definitely wrong.
Comment 4 Andrei Ilitchev CLA 2012-04-02 16:42:48 EDT
Checked the suggested patch into both trunk (2.4) and 2.3.3.
Comment 5 Michael Nielson CLA 2012-04-02 16:44:03 EDT
Thank you! Sorry about the original title confusion :)
Comment 6 Andrei Ilitchev CLA 2012-04-02 16:59:59 EDT
Thanks for finding the issue and providing the patch.
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:32:08 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink