-
2005年07月16日
数据库连接池的选型:DBCP vs C3P0
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
早上在JavaEye看到Robbin说:
http://fireshort.blogbus.com/logs/1315559.html
引用:
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随机文章:
javadbf中文问题的解决 2005年10月19日操作dbf的类库 2005年09月08日用Java进行LDAP编程的方式 2007年01月23日Java中对有BOM头的UTF-8文件的处理 2006年10月19日j2ee系统与rtx的整合实现 2006年07月27日
收藏到:Del.icio.us
引用地址:







