Connection pooling options with JDBC: DBCP vs C3P0

前端 未结 16 1867
遥遥无期
遥遥无期 2020-11-22 06:17

What is the best connection pooling library available for Java/JDBC?

I\'m considering the 2 main candidates (free / open-source):

  • Apache DBCP - http:/
16条回答
  •  醉话见心
    2020-11-22 06:51

    Just got done wasting a day and a half with DBCP. Even though I'm using the latest DBCP release, I ran into exactly the same problems as j pimmel did. I would not recommend DBCP at all, especially it's knack of throwing connections out of the pool when the DB goes away, its inability to reconnect when the DB comes back and its inability to dynamically add connection objects back into the pool (it hangs forever on a post JDBCconnect I/O socket read)

    I'm switching over to C3P0 now. I've used that in previous projects and it worked and performed like a charm.

提交回复
热议问题