数据库连接池的选型:DBCP vs C3P0

標簽: 瀏覽(15536)  日期:2007-04-25
早上在JavaEye看到Robbin说:
引用:

DBCP的bug非常多,因此Hibernate3已经不再支持DBCP连接池,而推荐使用C3PO。建议你更换数据库连接池。


然后跑去Hibernate官方论坛看,果然,在Please migrate away from DBCP看到Gavin说:
引用:
Guys, after many problems with DBCP, I have decided to remove built-in support for DBCP from Hibernate3, and deprecate DBCP in Hibernate 2.1. I advise everyone to migrate away from DBCP to something that actually works, like C3P0 or Proxool.

(If you /must/ use DBCP, you can always write your own connection provider.)

Actually, it is probably about time we remove any remaining dependencies to Apache commons stuff, since historically they have caused just /so/ much trouble. The only Apache things that do seem to work very well are Ant and log4j. Even commons-logging is a PIA, especially in Tomcat.


这个台湾Guy也是如此建议
引用:
挑選觀念: 是否認為 jakarta 是唯一選擇
是的話, 採用 commons-dbcp ; 不是的話, 採用 proxool / c3p0


Jakarta-commons社区对Hibernate官方不支持DBCP的应对:
http://wiki.apache.org/jakarta-commons/DBCP/Hibernate



-------------------------------------------------
下一篇:編寫自定義的proxool statistics

strong   2007-04-25

我还是觉得用proxool比较好用。

jony   2007-04-25

哪就是说要换连接池了。



  
Are you Bot? How you know that?ofcz no.