Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-dev] Code Review Request for Bug 515712 (ServerSession numberOfNonPooledConnectionsUsed can become invalid when Exception is thrown connecting accessor)

Link to bug:

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.

Back to the top