Ali Baba Druid data source assembly

The most commonly used data sources are mainly c3p0, dbcp, proxool, druid, first is that they
Spring recommend the use of DBCP;
Hibernate recommended c3p0 and Proxool
1, DBCP: the Apache
DBCP (DataBase Connection the pool) database connection pool. Connection pooling is a java project on apache, tomcat connection pool components are also used. Dbcp requires three separate packages: common-dbcp.jar, common-pool.jar , common-collections.jar database connection is established because a behavior very time-consuming and resource intensive, so a number of pre-established connection with the database through a connection pool, in memory, the application needs to establish a direct connection to the pool on the line to apply for a database connection, put it back after use. dbcp no automatic recovery function to idle connections.

2, C3P0:
C3P0 is an open source jdbc connection pool, which implements the data source and jndi binding, supporting and jdbc2 jdbc3 specification standard extension. c3p0 is asynchronous operation, slow process by helping jdbc operation is complete. These operations can be extended effectively improve performance. It currently use open source project Hibernate, Spring and so on. c3p0 automatic recovery Idle connection.

3, Proxool: Sourceforge
Proxool is a Java database connection pool technology. Is an open source project under the sourceforge, this project provides a robust, easy to use connection pooling, the most critical is the connection pool provides monitoring function, easy to use, easy to find connection leaks case. 
In summary, the stability is dbcp> = c3p0> proxool

Later, Alibaba druid open source, and can be no before or since, not one of the strongest, if stable, in large concurrent performance is very good

Today to introduce the main monitor, Druid provide this monitoring component, very convenient, shots are as follows:

It is aimed to monitor all sql, operating efficiency and so on can be seen

For monitoring the url, request time, concurrent and so on, very convenient

The current configuration information of the data source can be seen

Monitoring session, which I currently logged

Overall, the data source is good, highly recommended, and now has come to version 1.0.23

<!-- 连接池 阿里巴巴数据源 全世界最牛逼的data source 没有之一 -->

<druid.version>1.0.23</druid.version>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>druid</artifactId>
                <version>${druid.version}</version>
            </dependency>

 

Guess you like

Origin www.cnblogs.com/dekevin/p/11588194.html