DBCP - 它支持多线程吗?
我在很多地方看到: http://people.apache.org /~fhanik/jdbc-pool/jdbc-pool.html dbcp 不是多线程的,而且速度很慢等等。
不过他们去年确实发布了一个新版本。有谁知道上述已知问题是否已解决?
我目前正在使用 c3p0,但在某些情况下发现它很麻烦(例如,我运行 10 个线程,最大连接池大小设置为 300,几分钟内我看到几乎所有 300 个连接都打开...)。
谢谢,
亚伊尔
I see in many places like: http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html that dbcp is not multi-threaded and it is slow etc.
However they did release a new version last year. Does anyone know if the known issues as mentioned above are resolved or not?
I am currently using c3p0 but find it troubling in some cases (e.g. I run 10 threads with max connection pool size set to 300 and within a few minutes I see almost all the 300 connections open...).
Thanks,
Yair
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DBCP 1.4 比 1.2 有了很大的改进,因此我对有关 DBCP 缺点的旧讨论持谨慎态度。
有些人从 c3p0 中获得更好的性能,有些人从 DBCP 中获得更好的性能。连接池对配置和应用程序使用模式高度敏感,我怀疑这些库中的每一个都擅长不同的事情。
DBCP 1.4 is a big improvement over 1.2, so I'd be wary of older discussions concerning DBCP's shortcomings.
Some people get better performance out of c3p0, some get better out of DBCP. Connection pools are highly sensitive to configure and application usage patterns, and I suspect each of these libraries is better at different things.