Some colleagues recommended bonecp. The results of searching benchmark on the Internet were amazing. Recently, I used the connection pool to change it to bonecp. However, after my own use and testing, I switched back to c3p0 for two reasons:
1. bonecp is less stable than c3p0 in high concurrency, and other identical conditions (web layer jersey, data layer PostgreSQL ), when bonecp is used, the fluctuation of throughput measured multiple times is significantly greater than that of c3p0. At the same time, there is no essential difference between the two in terms of performance, and there is no obvious victory in bonecp, the connection pool of c3p0 is warmer or faster.
2. bonecp datasource does not support automatic reconnection (maybe I did not find it), which is terrible. I manually restarted the database during the test and c3p0 reconnected normally, bonecp is completely unresponsive.
As far as I know, oschina once tried to switch to bonecp. Later, it was said that it had changed back because of some bugs. My own feeling is similar. Even if bonecp claims to use the updated concurrent feature, so it has better performance, my own results are not very consistent with it.