Community
Participate
Working Groups
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.
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.
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.
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.
Checked the suggested patch into both trunk (2.4) and 2.3.3.
Thank you! Sorry about the original title confusion :)
Thanks for finding the issue and providing the patch.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink