Font Size: a A A

The Research Of Database Connection Pool Based On Java

Posted on:2007-06-05Degree:MasterType:Thesis
Country:ChinaCandidate:S JiangFull Text:PDF
GTID:2178360182980539Subject:Communication and Information System
Abstract/Summary:PDF Full Text Request
In a large-scale web-based business, which is related to database, the access is frequent, but every user must obtain a database connection if he/she want to access the data in a database. The matter makes database connection to be precious resource. In order to use the resource well, we shall take advantage of Object Pool Pattern, one of Shared Pool, to manage and reused database connections.The paper researches and analyzes the existing object pool and database connection pool, Commons-Pool and Commons-DBCP.1. The paper indicates a basic approach to implement object pool with Commons-Pool, and analyzes the interfaces/classes and methods. And introduces the key attributes and parameters in configuring object pool, and analyzes the architecture of Commons-Pool. The paper analyzes the relations of key interfaces/classes with UML diagram.2. When to Commons-Pool, the paper especially analyzes the interfaces/classes related to pooling and managing connections. Because Commons-DBCP uses Commons-Pool, then the relation of them is introduced.In order to show the result of database pool affects large-scale web and database-based business, and indicates that database pool can improve the efficiency, we must hold a performance testing. The paper introduces the base approaches in performance testing. We design and realize a testing solution. And the testing result shows that database connection pool improves efficiency obviously.The capability of traditional connection pool, including Commons-DBCP, can't be changed in run time. The paper improves the function of Commons-DBCP, and then users can adjust the capability of connection pool with real situation's requirements. The program of improvement is based on MVC design pattern. We make the program related to connection pool's operations as Model, and make the program used for users setting new pool capability with a GUI as View, and makethe program used for transferring user's requirements to Model as Controller.After finished the enhancement, in order to validate the improvement can fulfill the expectation, a function testing launched.
Keywords/Search Tags:Database Connection Pool, Object Pool, Testing
PDF Full Text Request
Related items