Code Review Request for Bug 515712 (ServerSession numberOfNonPooledConnectionsUsed can become invalid when Exception is thrown connecting accessor)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Code Review Request for Bug 515712 (ServerSession numberOfNonPooledConnectionsUsed can become invalid when Exception is thrown connecting accessor)

Jody Grassel
Link to bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=515712

With non-pooled connections, it is possible for the count of active connections to become inaccurate when a DatabaseException is raised when both creating the connection and disposing an invalid connection.  The result is the counter ServerSession.numberOfNonPooledConnectionsUsed can grow larger than the number of actual connections, leading to grow to a value >= that of ServerSession.maxNumberOfNonPooledConnections, which leads to permanent locking of threads that attempt to create a new Connection.

The above patch prevents the numberOfNonPooledConnectionsUsed from growing out of control when error conditions are encountered, preventing potential deadlocks.

_______________________________________________
eclipselink-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev