Comment 10 for bug 1152815

Revision history for this message
Larry Streepy (lstreepy) wrote :

I tracked this down and can provide a fix. For me, this problem is a result of configuring more than 1 connection partition and having all the connections destroyed due to an idle timeout. In this case, the DefaultConnectionStrategy has a bug in pollConnection() when it checks the other partitions (if it finds the original partition has no free connections).

At line 55 of DefaultConnectionStrategy.java, you have this:

        connectionPartition = this.pool.partitions[i];

Because the connectionPartition is being changed from the one determined above in line 44, the code at the bottom of the routine ends up signalling the wrong partition to wake up and create more connections. The simple fix is to comment out this line of code. Also, I would change the break on line 57 to a "return result" since there is no reason to signal for more connections when you know you've found one.