tomcat-dbcp vs commons-dbcp

后端 未结 6 1134
耶瑟儿~
耶瑟儿~ 2020-12-02 06:05

It seems there is a lot of confusion between these two connection pooling libraries. What I want to know is which one is better (if at all)?

Here are some points whi

6条回答
  •  悲&欢浪女
    2020-12-02 06:40

    Older versions of Apache Commons DBCP (i.e. version 1.2) had some nasty thread-safety issues under high load conditions, making it unsuitable for that kind of usage. It doesn't surprise me that the Tomcat folks re-worked it to fix these issues.

    However, my understanding is that Commons DBCP 1.4 fixes these issues. I can't confirm that personally, but it may render the Tomcat version redundant.

    Interestingly, SpringSource also rewrote Commons DBCP for their repackaged version of Tomcat (tc-Server), and they claim big performance benefits from it. They haven't open-sourced that, though.

提交回复
热议问题