In general, in the system used by many people, if the application does not use the Connection Pooling mechanism, it will cause a lot of performance issues, and the Connection opens the customs, except for slow, will also consume the resources of the database server. Most of the AP Server has a mechanism for providing Connection Pooling, and the program designer does not need to worry about how this mechanism works, as long as you know the relevant parameters. If you say that under some situation, what should we do when we must build a Connection Pooling mechanism? Of course, you should write it very disappointment, and it's not always written, here, we use a sub-project DBCP in Jakata Project to quickly build a Connection Pooling mechanism available everywhere. In Tomcat, DBCP is built-in to manage DB Connection Pooling. This mechanism is portable and can be used independently. To add DBCP functionality in your application, you must go to http://jakarta.apache.org/commons/index.html this URL, find this page Components, three must be downloaded: Collectes, DBCP, pool. DBCP is designed by COLLECTIONS AND POOL. Of course, if you have a Tomcat Server, the best way is to get to the Tomcat_Home / Common / Lib / directory, and the assurance version will not have problems. In Tomcat Server, the latest version included in Tomcat 5.0.19, these three components file names are commons-collections.jar, commons-pool-1.1.jar and commons-dbcp-1.1.jar. After obtaining the JAR file with DBCP, remember these JAR files, place them into the classpath, or put it directly to $ JAVA_HOME / JRE / LIB / EXT / directory. However, since DBCP has the function of DataSource, this feature is J2EE, so you must also download a JAVAX.jar file for J2EE. After the environment is built, you can start designing the mechanism for the design of Connection Pooling. Here, we will introduce the easiest ways, as long as the directives can be completed, please see the programs in the example area and their description. After this program is completed, you can enjoy the ability to get the connection poibility in your application, use dbconnect.getConnection () to get the connection poibility. In actual operation, this example has a quarterly command, which shows the current connection pool, how many idle's Connection and how many Active's Connection is available as a parameter adjustment basis for system operation.