天天笑911011 2009-07-19 10:08
浏览 486
已采纳

tomcat-dbcp与commons-dbcp的区别

[size=large]请问tomcat-dbcp与commons-dbcp有什么区别?
是不是配置文件不一样?[/size]

  • 写回答

5条回答 默认 最新

  • wanghaolovezlq 2009-07-20 08:42
    关注

    Many Jakarta projects support interaction with a relational database. Creating a new connection for each user can be time consuming (often requiring multiple seconds of clock time), in order to perform a database transaction that might take milliseconds. Opening a connection per user can be unfeasible in a publicly-hosted Internet application where the number of simultaneous users can be very large. Accordingly, developers often wish to share a "pool" of open connections between all of the application's current users. The number of users actually performing a request at any given time is usually a very small percentage of the total number of active users, and during request processing is the only time that a database connection is required. The application itself logs into the DBMS, and handles any user account issues internally.

    There are several Database Connection Pools already available, both within Jakarta products and elsewhere. This Commons package provides an opportunity to coordinate the efforts required to create and maintain an efficient, feature-rich package under the ASF license.

    [color=red]The commons-dbcp package relies on code in the commons-pool package to provide the underlying object pool mechanisms that it utilizes.

    Applications can use the commons-dbcp component directly or through the existing interface of their container / supporting framework. For example the Tomcat servlet container presents a DBCP DataSource as a JNDI Datasource. James (Java Apache Mail Enterprise Server) has integrated DBCP into the Avalon framework. A Avalon-style datasource is created by wrapping the DBCP implementation. The pooling logic of DBCP and the configuration found in Avalon's excalibur code is what was needed to create an integrated reliable DataSource.[/color]

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改